Skip to content

TextProperties

Canonical path: NemAll_Python_BasisElements.TextProperties

Implementation of the text properties

Methods:

Attributes:

Alignment property writable

Alignment: TextAlignment

Text alignment

BackgroundColor property writable

BackgroundColor: int

Background color of the text

ColumnSlopeAngle property writable

ColumnSlopeAngle: Angle

Slope angle of columns in [rad]

Expansion property writable

Expansion: int

Text expansion

Font property writable

Font: int

Font ID

FontAngle property writable

FontAngle: Angle

Angle of characters (italic) in [rad]

FontStyles property writable

FontStyles: int

Font style (Bold, Italic, Underline, Crossed out) via bits, where:

  • the first bit from right indicates the bold state
  • the second bit from right indicates the italic state
  • the third bit from right indicates the underlined state
  • the fourth bit from right indicates the crossed out state

HasBackgroundColor property writable

HasBackgroundColor: bool

Whether the text has a background color

HasReferencePoint property writable

HasReferencePoint: bool

Whether the text has a reference point

HasTextFrame property writable

HasTextFrame: bool

Whether to draw border around text

HasTransparentBackground property writable

HasTransparentBackground: bool

Whether the text background is to be transparent

Height property writable

Height: float

Height of text in [mm]

IsScaleDependent property writable

IsScaleDependent: bool

Whether the text is to be scale dependent

IsUserModifiable property writable

IsUserModifiable: bool

Whether the text should be modifiable by the user

LineFeed property writable

LineFeed: float

Line feed of text in [mm]

TextAngle property writable

TextAngle: Angle

Angle of whole text in [rad]

TextFrameColor property writable

TextFrameColor: int

Color ID of the text frame color

TextFramePen property writable

TextFramePen: int

Pen ID of the text frame

TextFrameStroke property writable

TextFrameStroke: int

Stroke ID of the text frame

Type property writable

Type: TextType

Text type (0 - normal text, >1 variable text)

Width property writable

Width: float

Text width in [mm]

WrappedText property writable

WrappedText: bool

Whether to use text wrapping.

WrappingWidth property writable

WrappingWidth: float

Wrapping width. Used when wrapping is active

GetRatio

GetRatio() -> float

Get text height/width ratio

Returns:

  • float

    height/width ratio

Init

Init()

Init section properties with default values

IsDraftText

IsDraftText() -> bool

Check if the text is a draft text (unprintable)

Returns:

  • bool

    True if text is unprintable, otherwise False

SetHasBackgroundColorAndTransparentBackgroundColor

SetHasBackgroundColorAndTransparentBackgroundColor(value: bool)

Setting for filling the text background with the color of the viewport

Parameters:

  • value (bool) –

    Set to to True to turn the background filling on.

__eq__

__eq__(prop: TextProperties) -> bool

equal operator

Parameters:

Returns:

  • bool

    true if they are equal, false otherwise

__init__ overloaded

__init__()

Initialize

__init__(element: TextProperties)

Copy constructor

Parameters:

__repr__

__repr__() -> str

Convert to string