API 参考
正在准备搜索索引…

RectangleShape

具有 Shape 外观和变换的 sf::RectangleShape 几何。

继承关系

层级 (查看层级一览)

源码与继承
成员目录43

构造函数

属性

方法

构造函数

属性

shapeInfo: Readonly<NativeShapeInfo>
源码与继承

方法

  • 参数

    operation
    number
    x
    number
    y可选
    number
    z可选
    number

    返回值

    void
    源码与继承
  • 返回当前纹理引用;未设置时为 null。

    返回值


        | null
        | Readonly<
            Pick<
                Texture,
                | "getSize"
                | typeof graphicsNative
                | typeof textureId
                | typeof textureOwner
                | "copyToImage"
                | "isSmooth"
                | "isRepeated"
                | "isSrgb"
                | "getNativeHandle",
            >,
        >
    源码与继承
  • 设置轮廓尖角延伸与厚度的最大比例,必须至少为 1。

    参数

    this
    ShapeResource
    limit
    number

    返回值

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

    参数

    this
    ShapeResource
    thickness
    number

    返回值

    void
    源码与继承
  • 设置并保留纹理引用;null 禁用纹理,resetRect 为 true 时覆盖整个纹理。

    参数

    this
    ShapeResource
    texture

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

    返回值

    void
    源码与继承

符号成员

"[graphicsNative]": NativeGraphicsHandle<"shape">
源码与继承
"[mutableValue]": true
源码与继承
"[shapeState]": ShapeData
源码与继承
"[transformableState]": TransformableState
源码与继承

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