DeltaTransform computes the net transform matrix for given delta transform parameters and the transformed version of the reference point. If self is true, then include the current node self transform, otherwise don't. Groups do not but regular rendering nodes do.
(trans math32.Vector2, scale math32.Vector2, rot float32, pt math32.Vector2, self bool)
| 194 | // include the current node self transform, otherwise don't. Groups do not |
| 195 | // but regular rendering nodes do. |
| 196 | func (g *NodeBase) DeltaTransform(trans math32.Vector2, scale math32.Vector2, rot float32, pt math32.Vector2, self bool) (math32.Matrix2, math32.Vector2) { |
| 197 | mxi := g.ParTransform(self) |
| 198 | mxi = mxi.Inverse() |
| 199 | lpt := mxi.MulVector2AsPoint(pt) |
| 200 | ldel := mxi.MulVector2AsVector(trans) |
| 201 | xf := math32.Scale2D(scale.X, scale.Y).Rotate(rot) |
| 202 | xf.X0 = ldel.X |
| 203 | xf.Y0 = ldel.Y |
| 204 | return xf, lpt |
| 205 | } |
| 206 | |
| 207 | // ApplyDeltaTransform applies the given 2D delta transforms to the geometry of this node |
| 208 | // relative to given point. Trans translation and point are in top-level coordinates, |
no test coverage detected