BrushCreateSolid(Color32) Method

Creates a solid Brush with the specified 32-bit color.

See the online help for an image example.

Definition

Namespace: KGySoft.Drawing.Shapes
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
C#
public static Brush CreateSolid(
	Color32 color
)

Parameters

color  Color32
A Color32 value that represents the color of the brush. This overload can be used also for Color instances as there is an implicit cast from Color to Color32.

Return Value

Brush
A Brush that uses the specified color.

Remarks

Though a solid brush generally uses a single color, filling a Path or a directly supported simple shape may use more colors if DrawingOptions.AntiAliasing is , or when color has alpha (transparency), and DrawingOptions.AlphaBlending is .

If the color has alpha and DrawingOptions.AlphaBlending is , the color space used for blending is determined by the specified Quantizer, or, when it is , by the WorkingColorSpace of the target IReadWriteBitmapData.

Examples

The following image was created with a solid brush created from 50% transparent blue color, and DrawingOptions.AlphaBlending was , whereas the target bitmap data had Linear working color space:
Polygon filled with 50% transparency, AntiAliasing = false, AlphaBlending = true.

See Also