SkiaSharp Lines and Paths

PDF for offline use
Sample Code:
Related APIs:

Let us know how you feel about this

Translation Quality


0/250

last updated: 2017-03

Use SkiaSharp to draw lines and graphics paths

The previous section demonstrated that the SkiaSharp SKCanvas class includes several methods to draw rectangles, ellipses, and rounded rectangles. 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 mathematically. A later section will 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 SkiaSharpFormsDemos program, and in the Paths folder of the 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.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.