- About Graphics Mill
- What's New?
- Breaking Changes in Graphics Mill 12
- Breaking Changes in Graphics Mill 11
- Features
- Supported File Formats
- System Requirements
- Getting Started
- Working with Image Formats
- Transforming Images (Resize, Rotate, Crop)
- Working with Metadata
- Color Management and Color Reduction
- Drawing Text and Graphics
- Color Keying (Green Screen Removal)
- Channels and Pixel Data
- Color and Tone Correction
- Working with Photoshop (PSD) Files
- Image Filters
- Processing Large Images
- Basics of Image Processing
- Troubleshooting
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- Aurigma.GraphicsMill.Codecs Namespace
- Aurigma.GraphicsMill.Codecs.ClippingPath Namespace
- Aurigma.GraphicsMill.Codecs.Psd Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- ArtTextFrame Class
- AutoSizeAnchor Enumeration
- AutoSizeMode Enumeration
- BeginDrawEventArgs Class
- BoundedText Class
- Brush Class
- CharInfo Class
- CharStyle Class
- ClippingPathCollection Class
- ColorStop Class
- ContainerItem Class
- ContainerItemCollection Class
- CopyfittingMode Enumeration
- CustomFontRegistry Class
- DigitType Enumeration
- DoublePathText Class
- DoublePathTextFrame Class
- Drawer Class
- DrawEventArgs Class
- EndDrawEventArgs Class
- FallbackFontCollection Class
- FamilyStyleCollisionPolicy Enumeration
- FillingRule Enumeration
- FirstBaselineOffset Enumeration
- Font Class
- FontAddResult Class
- FontAddStatus Enumeration
- FontFallbackException Class
- FontInfo Class
- FontMetrics Class
- FontMissingEventArgs Class
- FontRegistry Class
- GradientBrush Class
- Graphics Class
- Graphics Members
- Graphics Methods
- Clear Method
- CreateFont Method
- Dispose Method
- DrawBezier Method
- DrawBeziers Method
- DrawContainer Method
- DrawEllipse Method
- DrawEllipses Method
- DrawImage Method
- DrawLine Method
- DrawLines Method
- DrawPath Method
- DrawPolygon Method
- DrawRectangle Method
- DrawRectangles Method
- DrawText Method
- FillBezier Method
- FillBeziers Method
- FillEllipse Method
- FillEllipses Method
- FillPath Method
- FillPolygon Method
- FillRectangle Method
- FillRectangles Method
- Graphics Properties
- GraphicsContainer Class
- ImageItem Class
- IndexedColorCollection Class
- InstalledFontRegistry Class
- InvalidStyleValueException Class
- Item Class
- Layer Class
- LinearGradientBrush Class
- LineCap Enumeration
- LineJoin Enumeration
- MainPath Enumeration
- OpenTypeFeature Structure
- OpenTypeFeatureTag Enumeration
- ParagraphStyle Class
- Path Class
- PathBoundedText Class
- PathPoint Structure
- PathPointCollection Class
- PathPointType Enumeration
- PathText Class
- PathTextAlignment Enumeration
- PathTextFrame Class
- Pen Class
- PlainText Class
- PointTextFrame Class
- PostscriptNameCollisionPolicy Enumeration
- RadialGradientBrush Class
- ShapeItem Class
- ShapeTextFrame Class
- SoftMask Class
- SoftMaskMethod Enumeration
- SolidBrush Class
- StringMeasure Structure
- Text Class
- TextAlignment Enumeration
- TextDirection Enumeration
- TextException Class
- TextFrame Class
- TextItem Class
- TextOrientation Enumeration
- TilingBrush Class
- UnknownStyleNameException Class
- UnknownTagException Class
- VerticalAlignment Enumeration
- Aurigma.GraphicsMill.Drawing.Art Namespace
- Aurigma.GraphicsMill.Drawing.Effects Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Templates Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Licensing
- End User License Agreement
- Copyright Notices
Graphics.FillRectangles Method
Fills the interior of a number of rectangles specified by an array of RectangleF structures.
Namespace:
Aurigma.GraphicsMill.Drawing
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
C#
public void FillRectangles(
Brush brush,
RectangleF[] rectangles
)
Parameters
- brush
-
Type: Aurigma.GraphicsMill.Drawing.Brush
A Brush that determines the characteristics of the fill.
- rectangles
-
Type: System.Drawing.RectangleF[]
An array of RectangleF structures that represents the rectangles to draw.
Remarks
To draw outlined rectangles, use FillRectangles(Brush, RectangleF[]) method.
Examples
C#
using (var bitmap = new Bitmap(200, 80, PixelFormat.Format24bppRgb, RgbColor.White))
{
var graphics = bitmap.GetGraphics();
System.Drawing.RectangleF[] rectangles = {
new System.Drawing.RectangleF(10, 60, 10, 60),
new System.Drawing.RectangleF(40, 20, 10, 60),
new System.Drawing.RectangleF(70, 60, 10, 60),
new System.Drawing.RectangleF(130, 60, 10, 60),
new System.Drawing.RectangleF(160, 20, 10, 60),
new System.Drawing.RectangleF(190, 60, 10, 60),
new System.Drawing.RectangleF(40, 20, 10, 60)};
graphics.DrawRectangles(new Pen(RgbColor.Black), rectangles);
bitmap.Save(@"Images\Output\out.png");
}
See Also
Reference
- Graphics Class
- Aurigma.GraphicsMill.Drawing Namespace
- Graphics.FillRectangles(Brush, RectangleF[])