sfml.js
    Preparing search index...

    Class RectangleShape

    sf::RectangleShape geometry with Shape appearance and transformations.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    "[graphicsNative]": NativeGraphicsHandle<"shape">
    "[mutableValue]": true
    "[shapeState]": ShapeData
    "[transformableState]": TransformableState
    shapeInfo: Readonly<NativeShapeInfo>

    Methods

    • Parameters

      • operation: number
      • x: number
      • Optionaly: number
      • Optionalz: number

      Returns void

    • 返回当前纹理引用;未设置时为 null。

      Returns
          | null
          | Readonly<
              Pick<
                  Texture,
                  | "getSize"
                  | typeof graphicsNative
                  | typeof textureId
                  | typeof textureOwner
                  | "copyToImage"
                  | "isSmooth"
                  | "isRepeated"
                  | "isSrgb"
                  | "getNativeHandle",
              >,
          >

    • 设置轮廓尖角延伸与厚度的最大比例,必须至少为 1。

      Parameters

      • this: ShapeResource
      • limit: number

      Returns void

    • 设置局部坐标中的轮廓厚度;正值向外扩展,负值向内扩展。

      Parameters

      • this: ShapeResource
      • thickness: number

      Returns void

    • 设置并保留纹理引用;null 禁用纹理,resetRect 为 true 时覆盖整个纹理。

      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