Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICascadePoint

Hierarchy

Index

Properties

$initial

$initial: any

级联的初始上下文对象.

$reset

$reset: () => this

Use the $original as the $result.

Type declaration

    • (): this
    • Returns this

$result

$result: any

级联的当前最终值.

Methods

add

  • 将两个点相加,并将结果作为新的点对象返回.

    Parameters

    • b: IPoint

      Second point.

    • Optional subtract: boolean

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

    Returns ICascadePoint

    this cascade container, this.$result will be A new point object.

average

  • 获取两点中间值.

    Parameters

    Returns ICascadePoint

    this cascade container, this.$result will be New point object which is the average of a and b.

clone

  • 克隆点.

    Returns ICascadePoint

    this cascade container, this.$result will be A new point with same values as the original.

closest

  • 从点数组中,找到与给定参考点最近的点.

    Parameters

    • pointOptions: IPoint[]

      Array of points to choose from.

    Returns ICascadePoint

    this cascade container, this.$result will be The first closest point from the pointOptions.

distort

  • 扭曲点.

    Parameters

    • scaleX: number

      The amount of x scaling.

    • scaleY: number

      The amount of y scaling.

    Returns ICascadePoint

    this cascade container, this.$result will be A new point.

mirror

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

    Parameters

    • mirrorX: boolean

      Boolean to mirror on the x axis.

    • mirrorY: boolean

      Boolean to mirror on the y axis.

    Returns ICascadePoint

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

rotate

  • 旋转点.

    Parameters

    • angleInDegrees: number

      The amount of rotation, in degrees.

    • Optional rotationOrigin: IPoint

      (default [0, 0]) The center point of rotation.

    Returns ICascadePoint

    this cascade container, this.$result will be A new point.

rounded

  • 四舍五入点的值.

    Parameters

    • Optional accuracy: number

      Optional exemplar number of decimal places.

    Returns ICascadePoint

    this cascade container, this.$result will be A new point with the values rounded.

scale

  • 缩放点的坐标.

    Parameters

    • scaleValue: number

      The amount of scaling.

    • Optional basePoint: IPoint

      The basePoint of scaling.

    Returns ICascadePoint

    this cascade container, this.$result will be A new point.

subtract

  • 从另一个点减去一个点,并将结果作为新点返回. Add(a, b, subtract = true).

    Parameters

    Returns ICascadePoint

    this cascade container, this.$result will be A new point object.

Generated using TypeDoc