InlineTextShape.kl

Types

InlineTextShape (object)

バージョン 2.4.0 で追加.

The InlineTextShape inherits from the InlineBaseTextShape object. It provides a shape type to draw text with TextGL.

/*
** Example: InlineTextShape :nooutput:
*/

// Get or create an InlineAtlasTexture texture (shared)
FilePath fontPath = FilePath("${FABRIC_DIR}/Resources/Fonts/Roboto/Roboto-Regular.ttf");
Ref<InlineDrawing> drawing = OGLInlineDrawing_GetInstance();
InlineAtlasTexture texture = drawing.getOrCreateAtlasTexture(fontPath, 20);

// Get the atlas owned by the texture
Ref<AtlasGL> atlas = texture.getAtlas(); 

// Create the shape
InlineTextShape shape = InlineTextShape('Text', atlas);

Members

OGLText oglText  
InlineShapeAdaptor adaptor  

Methods

  InlineTextShape ( in InlineTextShape other )
  InlineTextShape ( in String name, in Ref<AtlasGL> atlas )
  InlineTextShape ()
InlineTextShape clone ? ()
  set2DText ! ( in Ref<AtlasGL> atlas, in String text, in Vec2 screenPosition, in Color color )
  set2DTextArray ! ( in Ref<AtlasGL> atlas, in String text[], in Vec2 screenPositions[], in Color color[] )
  set3DText ! ( in Ref<AtlasGL> atlas, in String text, in Vec3 worldPosition, in Color color )
  set3DTextArray ! ( in Ref<AtlasGL> atlas, in String text[], in Vec3 worldPositions[], in Color color[] )