Table of Contents

Method DrawTriangle

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

DrawTriangle(SKCanvas, SKPoint, SKSize, SKPaint)

Draws a triangle centered at the specified point with the given radii.

public static void DrawTriangle(this SKCanvas canvas, SKPoint c, SKSize r, SKPaint paint)

Parameters

canvas SKCanvas

The canvas to draw on.

c SKPoint

The center point of the triangle.

r SKSize

The horizontal and vertical radii of the triangle's bounding box.

paint SKPaint

The paint to use for drawing.

DrawTriangle(SKCanvas, float, float, float, float, SKPaint)

Draws a triangle centered at the specified coordinates with the given horizontal and vertical radii.

public static void DrawTriangle(this SKCanvas canvas, float cx, float cy, float rx, float ry, 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.

rx float

The horizontal radius (half the triangle width).

ry float

The vertical radius (half the triangle height).

paint SKPaint

The paint to use for drawing.

DrawTriangle(SKCanvas, SKRect, SKPaint)

Draws a triangle inscribed within the specified rectangle.

public static void DrawTriangle(this SKCanvas canvas, SKRect rect, SKPaint paint)

Parameters

canvas SKCanvas

The canvas to draw on.

rect SKRect

The bounding rectangle for the triangle.

paint SKPaint

The paint to use for drawing.

DrawTriangle(SKCanvas, SKPoint, float, SKPaint)

Draws a regular (equilateral) triangle centered at the specified point with the given circumscribed radius.

public static void DrawTriangle(this SKCanvas canvas, SKPoint c, float radius, SKPaint paint)

Parameters

canvas SKCanvas

The canvas to draw on.

c SKPoint

The center point of the triangle.

radius float

The circumscribed circle radius.

paint SKPaint

The paint to use for drawing.

DrawTriangle(SKCanvas, float, float, float, SKPaint)

Draws a regular (equilateral) triangle centered at the specified coordinates with the given circumscribed radius.

public static void DrawTriangle(this SKCanvas canvas, float cx, float cy, float radius, 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.

radius float

The circumscribed circle radius.

paint SKPaint

The paint to use for drawing.