Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICascadePath

Hierarchy

Index

Properties

$initial

$initial: any

级联的初始上下文对象.

$reset

$reset: () => this

Use the $original as the $result.

Type declaration

    • (): this
    • Returns this

$result

$result: any

级联的当前最终值.

Methods

addTo

  • 添加模型的路径。

    parentModel.paths[pathId] = childPath;
    

    Parameters

    • parentModel: IModel

      The model to add to.

    • pathId: string

      The id of the path.

    • Optional overwrite: boolean

      (default false) ????????????????????????????

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

alterLength

  • alterLength(distance: number, useOrigin?: boolean): ICascadePath
  • 通过延长或缩短路径来更改路径.

    Parameters

    • distance: number

      要在路径中添加或删除的长度数字量。使用正数延长,负数缩短。缩短时:此函数不会更改路径,如果生成的路径长度小于或等于零,则返回 null.

    • Optional useOrigin: boolean

      (default false) 可选标志,用于从起点而不是路径末尾更改.

    Returns ICascadePath

    this cascade container, this.$result will be 原始路径(用于级联),如果无法更改路径,则为 null.

breakAtPoint

  • 将一条路径一分为二。提供的路径将在提供的中断点处结束, 返回一条新路径,该路径从 pointOfBreak 开始,到提供的路径的初始终点结束. 对于 Circle,原始路径将就地转换为 Arc,并返回 null.

    Parameters

    • pointOfBreak: IPoint

      The point at which to break the path.

    Returns ICascadePath

    this cascade container, this.$result will be 当路径类型为直线或圆弧时,相同类型的新路径。为圆返回空值.

center

  • 将路径居中位于 [0, 0].

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

clone

  • 创建路径的克隆。这比克隆对象更快.

    Parameters

    • Optional offset: IPoint

      可选点移动路径相对距离.

    Returns ICascadePath

    this cascade container, this.$result will be Cloned path.

copyProps

  • 将一个路径的属性复制到另一个路径.

    Parameters

    • destPath: IPath

      The destination path to copy property values to.

    Returns ICascadePath

    this cascade container, this.$result will be The source path.

data

  • 设置路径的属性数据。

    pathContext.data = data;
    

    Parameters

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

layer

  • 设置路径图层.

    pathContext.layer = layer;
    

    Parameters

    • layer: string

      The layer name.

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

mirror

  • 创建路径的克隆,在 x 轴和 y 轴上或两个轴上镜像.

    Parameters

    • mirrorX: boolean

      Boolean to mirror on the x axis.

    • mirrorY: boolean

      Boolean to mirror on the y axis.

    Returns ICascadePath

    this cascade container, this.$result will be Mirrored path.

move

  • 将路径移动到绝对点.

    Parameters

    • origin: IPoint

      The new origin for the path.

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

moveRelative

  • 按相对量移动路径的原点.

    Parameters

    • delta: IPoint

      作为点对象的 x 和 y 调整.

    • Optional subtract: boolean

      可选的布尔值减去而不是加法.

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

rotate

  • 旋转路径.

    Parameters

    • angleInDegrees: number

      旋转量,以度为单位.

    • Optional rotationOrigin: IPoint

      (default [0, 0]) 旋转中心点.

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

scale

  • 缩放路径.

    Parameters

    • scaleValue: number

      缩放量.

    • Optional basePoint: IPoint

      缩放的基点.

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

zero

  • 移动路径,使其边界框从 [0, 0] 开始.

    Returns ICascadePath

    this cascade container, this.$result will be The original path (for cascading).

Generated using TypeDoc