Options
All
  • Public
  • Public/Protected
  • All
Menu

PathFigure类

层次结构

  • PathFigure

PathFigure表示 Geometry 的一部分 它是二维几何 PathSegment 的单个连接的顺序

Geometry.figures 属性是PathFigures的列表

PathFigures是使用 Shape.stroke 和其他描边属性绘制的 填充的 PathFigures 用 Shape.fill 绘制

一旦将 PathFigure 包含的 Geometry 分配给 Shape,就不得对其进行修改

Index

Constructors

Properties

Methods

Constructors

constructor

  • new PathFigure(sx?: number, sy?: number, filled?: boolean, shadowed?: boolean): PathFigure
  • 构造一个空图形,可选参数指定图形的起点,你需要将PathFigure的新实例添加到 GeometryGeometry.figures 列表中

    Parameters

    • Optional sx: number

      可选: 起点的X坐标(默认为0)

    • Optional sy: number

      可选: 起点的Y坐标(默认为0)

    • Optional filled: boolean

      可选: 是否填充图形(默认为true)

    • Optional shadowed: boolean

      可选: 是否可以用阴影绘制图形(默认为true)

    Returns PathFigure

Properties

isFilled : boolean

  • 获取或者设置此PathFigure是否绘制为填充,默认值是true

isShadowed : boolean

  • 获取或者设置是否在自定义了PathFigure情况下渲染阴影,这用于关闭特定子路径上的阴影,默认值是true

segments : List<PathSegment>

startX : number

  • 获取或者设置PathFigure的起点X坐标,默认值为0

startY : number

  • 获取或者设置PathFigure的起点Y坐标,默认值为0

Methods

add

Virtual copy

  • 创建此PathFigure的副本,使用相同的值和segments

    Returns PathFigure