← Back to Docs
  • index.html
  • Clayground
  • Clayground.Canvas
  • Text
  • Clayground 2026.14
  • Text QML Type

    Text element positioned in world units with scalable font size. More...

    Import Statement: import Clayground.Canvas

    Detailed Description

    Text extends Qt Quick's Text to work with ClayCanvas world coordinates. Position and font size are specified in world units.

    Example usage:

    import Clayground.Canvas as Canv
    
    Canv.Text {
        canvas: myCanvas
        xWu: 0; yWu: 2
        fontSizeWu: 0.5
        text: "Hello World!"
        color: "blue"
    }

    Properties

    The parent canvas for coordinate transformation. Required.

    X position in world units.

    Y position in world units.

    Font size in world units.

    Pen used for the text: "none" (default), "chalk" or "marker". Both sketch pens switch font.family to the hand font the plugin ships; "chalk" adds a faint offset copy as grain.

    How much of the text is written, from 0 to 1 (default 1). Whole characters are revealed from the left. Single line text; a wrapped text is revealed by width only.

    Number of characters currently shown, ceil(progress * text.length).

    Family name of the hand font shipped with the plugin, empty until it is loaded.