Method DrawTriangle
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
canvasSKCanvasThe canvas to draw on.
cSKPointThe center point of the triangle.
rSKSizeThe horizontal and vertical radii of the triangle's bounding box.
paintSKPaintThe 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
canvasSKCanvasThe canvas to draw on.
cxfloatThe x-coordinate of the center.
cyfloatThe y-coordinate of the center.
rxfloatThe horizontal radius (half the triangle width).
ryfloatThe vertical radius (half the triangle height).
paintSKPaintThe 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
canvasSKCanvasThe canvas to draw on.
rectSKRectThe bounding rectangle for the triangle.
paintSKPaintThe 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
canvasSKCanvasThe canvas to draw on.
cSKPointThe center point of the triangle.
radiusfloatThe circumscribed circle radius.
paintSKPaintThe 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)