Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace d2

Index

Type aliases

D2CirArc

D2CirArc: [ArrayPoint2, number, number, number, boolean]

[center, r, startRadian, endRadian, counterclockwise]

D2Circle

D2Circle: [ArrayPoint2, number]

[center, r]

D2CssColor

D2CssColor: string | "transparent"

D2CssLinearGradient

D2CssLinearGradient: { colors: Array<{ color: string; stop?: number }>; dir: "left" | "right" | "top" | "bottom" }

Type declaration

  • colors: Array<{ color: string; stop?: number }>

    { stop: 介于 0.0 与 1.0 之间的值,表示渐变中开始与结束之间的位置 color: 在结束位置显示的 CSS 颜色值 }

  • dir: "left" | "right" | "top" | "bottom"

    direction string.

D2FillPattern

D2FillPattern: { image: HTMLImageElement | SVGImageElement | HTMLVideoElement; repeat?: "repeat" | "repeat-x" | "repeat-y" | "no-repeat" }

Type declaration

  • image: HTMLImageElement | SVGImageElement | HTMLVideoElement
  • Optional repeat?: "repeat" | "repeat-x" | "repeat-y" | "no-repeat"

D2Line

[p1, p2]

D2Path

D2Path: ArrayPoint2[]

D2Rect

D2Rect: [number, number, number, number]

[x, y, width, height]

D2Text

D2Text: [string, ArrayPoint2] | [string, ArrayPoint2, number]

[text, point, maxWidth]

D2Triangle

[p1, p2, p3]