Tue, 09/24/2024 - 06:19
Forums:
Handle(AIS_TextLabel) label = new AIS_TextLabel();
TCollection_ExtendedString labelString(std:string.c_str());
label->SetText(labelString);
Handle(Prs3d_TextAspect) textAspect = label->Attributes()->TextAspect();
Quantity_Color textColor(Quantity_NOC_BLACK);
textAspect->SetColor(textColor);
textAspect->SetHeight(30.0);
label->SetPosition(gp_Pnt);
gp_Trsf translation;
gp_Vec moveVec(50, 50, 0);
label->SetLocalTransformation(translation);
label->SetZoomable(false);
Quantity_Color backgroundColor(Quantity_NOC_GREEN);
label->SetDisplayType(Aspect_TODT_SUBTITLE);
label->SetColorSubTitle(backgroundColor);
AIS_InteractiveContext->Display(label, Standard_True);
Attachments: