类型 PathCommand

API 文档由 Go 源码生成,内容为英文。

type PathCommand struct {
	Kind     PathCommandKind
	Point    Point
	Control1 Point
	Control2 Point
}

PathCommand is one explicit path instruction in view-box coordinates. Quad commands use Control1; cubic commands use both control points.

构造函数

ClosePath#

func ClosePath() PathCommand

ClosePath closes the current contour.

CubicTo#

func CubicTo(c1x, c1y, c2x, c2y, x, y float32) PathCommand

CubicTo appends one cubic curve to the current contour.

LineTo#

func LineTo(x, y float32) PathCommand

LineTo appends one straight segment to the current contour.

MoveTo#

func MoveTo(x, y float32) PathCommand

MoveTo begins a new path contour.

QuadTo#

func QuadTo(cx, cy, x, y float32) PathCommand

QuadTo appends one quadratic curve to the current contour.