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).
()
| 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). |
| 855 | func (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. |
| 860 | func (m Matrix) ToSVG(h float64) string { |