/// <summary> /// Draws this shape using the given modulating color and transform. /// </summary> public void Draw(Render Render, Color4 Color, Transform Transform) { Render.Vertex(Transform * Destination.TopLeft, Source.TopLeft, Color); Render.Vertex(Transform * Destination.BottomLeft, Source.BottomLeft, Color); Render.Vertex(Transform * Destination.BottomRight, Source.BottomRight, Color); Render.Vertex(Transform * Destination.TopRight, Source.TopRight, Color); }
/// <summary> /// Composes two transforms such that projection in the returned transform is equivalent to /// projection in A followed by projection in B. /// </summary> public static Transform Compose(Transform A, Transform B) { return new Transform( B.Project(A.Offset), B.Right * A.Right.X + B.Up * A.Right.Y, B.Right * A.Up.X + B.Up * A.Up.Y); }