MCPcopy Create free account
hub / github.com/tdewolff/canvas / Transform

Method Transform

util.go:346–348  ·  view source on GitHub ↗

Transform transforms the point by affine transformation matrix m.

(m Matrix)

Source from the content-addressed store, hash-verified

344
345// Transform transforms the point by affine transformation matrix m.
346func (p Point) Transform(m Matrix) Point {
347 return m.Dot(p)
348}
349
350// Interpolate returns a point on PQ that is linearly interpolated by t in [0,1], i.e. t=0 returns P and t=1 returns Q.
351func (p Point) Interpolate(q Point, t float64) Point {

Callers

nothing calls this directly

Calls 1

DotMethod · 0.45

Tested by

no test coverage detected