← Back to Docs
  • index.html
  • Clayground
  • Clayground.Canvas
  • Image
  • Clayground 2025.2
  • Image QML Type

    An image positioned and sized in world units. More...

    Import Statement: import Clayground.Canvas

    Detailed Description

    Image extends Qt Quick's Image to work with ClayCanvas world coordinates. Position and size are specified in world units, with the image scaled to fit.

    Example usage:

    import Clayground.Canvas as Canv
    
    Canv.Image {
        canvas: myCanvas
        xWu: -5; yWu: 5
        widthWu: 3; heightWu: 3
        source: "player.png"
    }

    Properties

    The parent canvas for coordinate transformation. Required.

    X position in world units.

    Y position in world units.

    Width in world units.

    Height in world units.