Table of Contents

Class Paint

Namespace
PluginUI
Assembly
PluginUI.dll

Describes how a shape is filled: solid color, linear or radial gradient.

public abstract record Paint : IEquatable<Paint>
Inheritance
Paint
Implements
Derived
Inherited Members

Remarks

Gradient coordinates are relative to the bounds of the filled shape (0..1) unless RelativeToBounds is false, in which case they are absolute DIPs.

Methods

Horizontal(Color, Color)

Left-to-right two-color gradient.

public static LinearGradientPaint Horizontal(Color left, Color right)

Parameters

left Color
right Color

Returns

LinearGradientPaint

Radial(Color, Color)

Radial gradient from the center color to the edge color.

public static RadialGradientPaint Radial(Color center, Color edge)

Parameters

center Color
edge Color

Returns

RadialGradientPaint

Vertical(Color, Color)

Top-to-bottom two-color gradient.

public static LinearGradientPaint Vertical(Color top, Color bottom)

Parameters

top Color
bottom Color

Returns

LinearGradientPaint

Operators

implicit operator Paint(Color)

Implicit conversion from a color.

public static implicit operator Paint(Color color)

Parameters

color Color

Returns

Paint