实现

构造函数

属性

访问器

方法

构造函数

属性

amount: number = 0.6

The amount of fill, ranging from 0 to 1.

填充的数量,范围从0到1。

clockwise: boolean = true

Whether the filling is done in a clockwise direction. Only applicable for Radial90, Radial180, and Radial360 methods.

填充是否按顺时针方向进行。仅对Radial90、Radial180和Radial360方法适用。

origin: number = 0

The origin point for filling. Its meaning varies depending on the method.

  • When the method is Horizontal, use FillOrigin.Left and FillOrigin.Right to indicate the starting point;
  • When the method is Vertical, use FillOrigin.Top and FillOrigin.Bottom to indicate the starting point;
  • When the method is Radial90, use FillOrigin.TopLeft, FillOrigin.TopRight, FillOrigin.BottomLeft, and FillOrigin.BottomRight to indicate the four corners;
  • When the method is Radial180, use FillOrigin.Top, FillOrigin.Bottom, FillOrigin.Left, and FillOrigin.Right to indicate the four sides, starting from the center of the corresponding side;
  • When the method is Radial360, use FillOrigin.Top, FillOrigin.Bottom, FillOrigin.Left, and FillOrigin.Right to indicate the four sides, starting from the center of the corresponding side;

填充的起始点。method不同,值的含义也不同。

  • 当method为Horizontal时,使用FillOrigin.Left和FillOrign.Right表示起始点;
  • 当method为Vertical时,使用FillOrigin.Top和FillOrigin.Bottom表示起始点;
  • 当method为Radial90时,使用FillOrigin.TopLeft、FillOrigin.TopRight、FillOrigin.BottomLeft、FillOrigin.BottomRight四个值表示四个角;
  • 当method为Radial180时,使用FillOrigin.Top、FillOrigin.Bottom、FillOrigin.Left、FillOrigin.Right四个值表示四个边,从对应边的中心开始填充;
  • 当method为Radial360时,使用FillOrigin.Top、FillOrigin.Bottom、FillOrigin.Left、FillOrigin.Right四个值表示四个边,从对应边的中心开始填充;

访问器

方法