CanvasDrawingSessionTransform Property |
Namespace: Microsoft.Graphics.Canvas
Transform may be changed multiple times in a single drawing session.
The example below demonstrates what happens when Transform is assigned different values within a single drawing session.
using (var ds = renderTarget.CreateDrawingSession()) { ds.Transform = Matrix3x2.CreateTranslation(new Vector2(10, 10)); ds.DrawText("A", 0, 0, Colors.White); // "A" drawn at (10, 10) ds.Transform = Matrix3x2.CreateTranslation(new Vector2(100, 100)); ds.DrawText("B", 0, 0, Colors.White); // "B" drawn at (100, 100) }