Share via


SkiaSharp Lines and Paths

Use SkiaSharp to draw lines and graphics paths

The previous section demonstrated that the SkiaSharp SKCanvas class includes several methods to draw circles, ovals, rectangles, rounded rectangles, text, and bitmaps. This section and later sections cover the various classes connected with creating and rendering graphics paths.

The graphics path is the most generalized approach to drawing lines and curves in SkiaSharp. This section covers using an SKPath object to draw straight lines, and to use a collection of tiny straight lines (called a polyline) to draw curves that you can define algorithmically. A later section on SkiaSharp Curves and Paths discusses the various sorts of curves supported by SKPath.

All the sample programs in this section appear under the heading Lines and Paths in the home page of the sample program, and in the Paths folder of that solution.

Lines and Stroke Caps

Learn how to use SkiaSharp to draw lines with different stroke caps.

Path Basics

Explore the SkiaSharp SKPath object for combining lines and curves.

The Path Fill Types

Discover the different effects possible with SkiaSharp path fill types.

Polylines and Parametric Equations

Use SkiaSharp to render any line you can define with parametric equations.

Dots and Dashes

Master the intricacies of drawing dotted and dashed lines in SkiaSharp.

Finger Painting

Use your fingers to paint on the canvas.