Class PoMiscTextAttr

All Implemented Interfaces:
SafeDisposable

public class PoMiscTextAttr extends PoNode
Node to define miscellaneous text attributes (font name, line length,...). This node defines the current miscellaneous text attributes for all subsequent MeshViz representations which contain text. These attributes are the font name, the line length, the end line character.

File format/default:

PoMiscTextAttr {

    fontName "defaultFont"
    lineLength LINE_LENGTH_MAX
    endLineChar ' '
    profileEnabled false
    predefinedProfileEnabled true
    outliningEnabled true
}
  • Field Details

    • fontName

      public final SoSFString fontName
      Font name for text.
    • lineLength

      public final SoSFShort lineLength
      Defines the max number of characters per line. If several endLineChar appear before the lineLength character, only the last endLineChar is taken into account. if lineLength = LINE_LENGTH_MAX, the lines length is not limited, and if lineLength = LINE_LENGTH_MIN, the lines are limited to one word.

      Example of use with the string "United States of America" (24 characters) :

      • with endLineChar = ' ' and lineLength = 15, the string is cut into two lines: "United States" and "of America".
      • with endLineChar = ' ' and lineLength = 18, the string is cut into two lines: "United States of" and "America".

      Be careful, words (consecutive characters delimited by endLineChar characters) are never truncated, so lines could exceed lineLength characters if the first word of the line contains more than lineLength characters.

    • endLineChar

      public final SoSFShort endLineChar
      Defines the end line character.
    • profileEnabled

      public final SoSFBool profileEnabled
      Enables/Disables the appearance of a profile for 3D Text. Only SoText3 text takes into account of this option (cf PoBase.setTextType()) to to select the type of text used).
    • predefinedProfileEnabled

      public final SoSFBool predefinedProfileEnabled
      Enables/Disables the use of a predefined profile for 3D text if they are activated (cf profileEnabled field). If this field is set to false, the current profile in the state is used (cf SoLinearProfile,...)
    • outliningEnabled

      public final SoSFBool outliningEnabled
      Enables/Disables drawing of the outline of polygonal text (SoText3 and SoAnnoText3). For filled text that is small relative to the viewer size, drawing the outline improves the appearance of the text. For larger text, the outline can be deactivated to improve performance and prevent the text having a bold appearance.

      Since:
      Open Inventor 4.0

  • Constructor Details

    • PoMiscTextAttr

      public PoMiscTextAttr()
      Constructor.