Skip to content

Remove the white background of a symbol when outputting using OpenCascade's AIS_Textlabel? #1486

@Aleksandr34nov

Description

@Aleksandr34nov

Hello everyone, I'm implementing a program for working with shapes using OpenCascade. Please help me remove the white background around a symbol when outputting symbols using OpenCascade's AIS_Textlabel. How can I remove the white background around a symbol?Or is there another way to display text on the stage so that it lies in the plane of the size and does not turn towards the camera when the camera rotates and does not change size when zooming? This is my code:

label = AIS_TextLabel()
label.SetText(str(text))
label.SetPosition(gp_Pnt(*position))
label.SetHeight(height)
label.SetDisplayType(1)

label.SetHJustification(Graphic3d_HTA_CENTER)
label.SetVJustification(Graphic3d_VTA_CENTER)

if hasattr(label, "SetBackdrop"):
    label.SetBackdrop(False)

color_obj = Quantity_Color(*color, Quantity_TOC_RGB)
label.SetColor(color_obj)

self._context.Display(label, False)

I want to remove the white rectangle around the number one:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions