Table of Contents

Method DrawSquare

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

DrawSquare(SKCanvas, SKPoint, float, SKPaint)

Draws a square centered at the specified point.

public static void DrawSquare(this SKCanvas canvas, SKPoint c, float side, SKPaint paint)

Parameters

canvas SKCanvas

The canvas to draw on.

c SKPoint

The center point of the square.

side float

The length of each side of the square.

paint SKPaint

The paint to use for drawing.

DrawSquare(SKCanvas, float, float, float, SKPaint)

Draws a square centered at the specified coordinates.

public static void DrawSquare(this SKCanvas canvas, float cx, float cy, float side, SKPaint paint)

Parameters

canvas SKCanvas

The canvas to draw on.

cx float

The x-coordinate of the center.

cy float

The y-coordinate of the center.

side float

The length of each side of the square.

paint SKPaint

The paint to use for drawing.