Table of Contents

Enum LineJoin

Namespace
Egami.Drawing
Assembly
Egami.Drawing.dll

How a stroke turns the corner where two segments meet.

public enum LineJoin

Fields

Bevel = 2

The outer corners are joined by a straight line.

Miter = 0

The outer edges are extended until they meet, unless that point is further than MiterLimit allows; then as Bevel. The default.

Round = 1

A circular arc around the corner.

Examples

// The pen is data: width, caps, joins and miter limit. Width 1, butt caps and miter joins by default.
Stroke thick = new(12) { Cap = LineCap.Round, Join = LineJoin.Round };
canvas.DrawLine(new Vector2(20, 20), new Vector2(280, 20), thick, new Rgba8(30, 90, 200, 255));

Path zigzag = Path.Polygon([new(20, 120), new(80, 60), new(140, 120), new(200, 60), new(260, 120)], close: false);
canvas.StrokePath(zigzag, new Stroke(8) { Join = LineJoin.Miter, MiterLimit = 4 }, Rgba8.Black);

// A hairline is one device pixel wide whatever the transform.
canvas.StrokeCircle(new Vector2(150, 160), 30, Stroke.Hairline, Rgba8.Red);