跳到主要内容

dragonBones.Rectangle

   dragonBones

   public class Rectangle

  • Rectangle 对象是按其位置(由它左上角的点 (x, y) 确定)以及宽度和高度定义的区域。

Rectangle 类的 x、y、width 和 height 属性相互独立;更改一个属性的值不会影响其他属性。但是,right 和 bottom 属性与这四个属性是整体相关的。例如,如果更改 right 属性的值,则 width属性的值将发生变化;如果更改 bottom 属性,则 height 属性的值将发生变化。

公共属性

属性
height : number
- The height of the rectangle, in pixels.
width : number
- 矩形的宽度(以像素为单位)
x : number
- 矩形左上角的 x 坐标
y : number
- 矩形左上角的 y 坐标

属性详细信息

height

height : number = 0.0

  • 支持版本:DragonBones 3.0

  • 运行平台:Web,Native

  • The height of the rectangle, in pixels.

width

width : number = 0.0

  • 支持版本:DragonBones 3.0

  • 运行平台:Web,Native

  • 矩形的宽度(以像素为单位)。

x

x : number = 0.0

  • 支持版本:DragonBones 3.0

  • 运行平台:Web,Native

  • 矩形左上角的 x 坐标。

y

y : number = 0.0

  • 支持版本:DragonBones 3.0

  • 运行平台:Web,Native

  • 矩形左上角的 y 坐标。