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

Method String

util.go:855–857  ·  view source on GitHub ↗

String returns a string representation of the affine transformation matrix as six values, where [a b c; d e f; g h i] will be written as "a b d e c f" as g, h and i have fixed values (0, 0 and 1 respectively).

()

Source from the content-addressed store, hash-verified

853
854// String returns a string representation of the affine transformation matrix as six values, where [a b c; d e f; g h i] will be written as "a b d e c f" as g, h and i have fixed values (0, 0 and 1 respectively).
855func (m Matrix) String() string {
856 return fmt.Sprintf("(%g %g; %g %g) + (%g,%g)", m[0][0], m[0][1], m[1][0], m[1][1], m[0][2], m[1][2])
857}
858
859// ToSVG writes out the matrix in SVG notation, taking care of the proper order of transformations.
860func (m Matrix) ToSVG(h float64) string {

Callers 1

ToSVGMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected