Table of Contents

Constructor Pen

Namespace
LMKit.Graphics.Drawing
Assembly
LM-Kit.NET.dll

Pen(Color32, double)

Initializes a new instance of the Pen class with the specified color and thickness.

public Pen(Color32 color, double size)

Parameters

color Color32

The color of the pen.

size double

The thickness of the pen. Must be greater than zero.

Examples

// Simple black pen, 1 pixel thick.
var thin = new Pen(new Color32(0, 0, 0), 1);

// Thick blue pen with inside alignment.
var thick = new Pen(new Color32(0, 0, 255), 5) { Alignment = PenAlignment.Inside };

Exceptions

ArgumentOutOfRangeException

Thrown if size is less than or equal to zero.