Canvas and 2D drawing
Draw shapes, text, and images with Canvas. Start with a working view, explore paints and transforms, then combine drawing and input in an interactive surface.
In this section
- Canvas fundamentals - Draw a view with Canvas, inspect its C# source and SVG, and run the same example interactively.
- Shapes, paths, and curves - Construct a path and paint its fill, stroke, and curved segments.
- Colors, gradients, and compositing - Apply gradients, opacity, and clipping within the supported Canvas contract.
- Transforms and coordinate spaces - Compose translation, rotation, and scale and reverse them for input.
- Draw and measure text - Align text using its baseline, advance width, and font metrics.
- Images and SVG output - Fit packaged images and export vector views with explicit backend requirements.
- Build an interactive drawing surface - Drag a diagram object, pan its camera, and zoom around an anchor.
Explore the full Reference for related topics.