This class represents a brush which fills the shape with predefined pattern.
Namespace:
Aurigma.GraphicsMill.Drawing
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public NotInheritable Class HatchBrush _ Inherits Brush
public sealed class HatchBrush : Brush
Hatch brush is defined with three parameters: hatch style or pattern (HatchStyle property), foreground color, i.e. color of the pattern (ForegroundColor property), and background color (BackgroundColor property). Besides of this, you can disable background with TransparentBackground property. In this case only pattern will be drawing with foreground on the underlying image.
You can convert this brush instance into its analogue from System.Drawing namespace using method ToGdiplusBrush(), or appropriate cast operator.
Dim bitmap As New Aurigma.GraphicsMill.Bitmap( _ Aurigma.GraphicsMill.RgbColor.White, 185, 145, _ Aurigma.GraphicsMill.PixelFormat.Format24bppRgb) Dim graphics As Aurigma.GraphicsMill.Drawing.GdiGraphics = bitmap.GetGdiGraphics() 'Draw filled but non-outlined ellipse Dim brush As New Aurigma.GraphicsMill.Drawing.HatchBrush brush.ForegroundColor = Aurigma.GraphicsMill.RgbColor.Blue brush.BackgroundColor = Aurigma.GraphicsMill.RgbColor.Yellow brush.TransparentBackground = True brush.HatchStyle = Aurigma.GraphicsMill.Drawing.HatchStyle.Cross graphics.FillEllipse(brush, 60, 40, 100, 80)
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap( Aurigma.GraphicsMill.RgbColor.White, 185, 145, Aurigma.GraphicsMill.PixelFormat.Format24bppRgb); Aurigma.GraphicsMill.Drawing.GdiGraphics graphics = bitmap.GetGdiGraphics(); //Draw filled but non-outlined ellipse Aurigma.GraphicsMill.Drawing.HatchBrush brush = new Aurigma.GraphicsMill.Drawing.HatchBrush(); brush.ForegroundColor = Aurigma.GraphicsMill.RgbColor.Blue; brush.BackgroundColor = Aurigma.GraphicsMill.RgbColor.Yellow; brush.TransparentBackground = true; brush.HatchStyle = Aurigma.GraphicsMill.Drawing.HatchStyle.Cross; graphics.FillEllipse(brush, 60, 40, 100, 80);