API reference
Preparing search index…

RectangleShape

sf::RectangleShape geometry with Shape appearance and transformations.

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory43

Constructors

Properties

Methods

Constructors

Properties

shapeInfo: Readonly<NativeShapeInfo>
Source & inheritance

Methods

  • Parameters

    operation
    number
    x
    number
    yOptional
    number
    zOptional
    number

    Returns

    void
    Source & inheritance
  • Returns the current texture reference, or null if none is set.

    Returns


        | null
        | Readonly<
            Pick<
                Texture,
                | "getSize"
                | typeof graphicsNative
                | typeof textureId
                | typeof textureOwner
                | "copyToImage"
                | "isSmooth"
                | "isRepeated"
                | "isSrgb"
                | "getNativeHandle",
            >,
        >
    Source & inheritance
  • Sets the maximum ratio of outline miter extension to thickness; must be at least 1.

    Parameters

    this
    ShapeResource
    limit
    number

    Returns

    void
    Source & inheritance
  • Sets outline thickness in local coordinates; positive values extend outward and negative values inward.

    Parameters

    this
    ShapeResource
    thickness
    number

    Returns

    void
    Source & inheritance
  • Sets and retains a texture reference; null disables texturing, and resetRect true covers the entire texture.

    Parameters

    this
    ShapeResource
    texture

        | null
        | Readonly<
            Pick<
                Texture,
                | "getSize"
                | typeof graphicsNative
                | typeof textureId
                | typeof textureOwner
                | "copyToImage"
                | "isSmooth"
                | "isRepeated"
                | "isSrgb"
                | "getNativeHandle",
            >,
        >
    resetRect
    boolean = false

    Returns

    void
    Source & inheritance
  • Rebuilds native geometry from the subclass's getPointCount/getPoint; call after changing custom points.

    Parameters

    this

    Returns

    void
    Source & inheritance

Symbol members

"[graphicsNative]": NativeGraphicsHandle<"shape">
Source & inheritance
"[mutableValue]": true
Source & inheritance
"[shapeState]": ShapeData
Source & inheritance
"[transformableState]": TransformableState
Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0