Skip to main content

PdfGraphics.FillEllipse(Brush, RectangleF) Method

Fills the interior of an ellipse located in the specified page rectangle.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v24.1.Drawing.dll

NuGet Package: DevExpress.Pdf.Drawing


public void FillEllipse(
    Brush brush,
    RectangleF rect


Name Type Description
brush Brush

A Brush object that specifies the brush used to fill the ellipse.

rect RectangleF

A RectangleF structure that specifies a page area (in world coordinate system) where you can draw an ellipse.


This method fills the ellipse interior with a brush. The rect parameter specifies the ellipse boundaries.

To draw a shape on the PDF page, use one of the following methods:

PdfGraphics.AddToPageForeground, PdfGraphics.AddToPageBackground
These methods allow you to draw content on an existing page.
Draws content on a new page.

The code sample below fills an ellipse with the specified brush.

Fill an Ellipse

using DevExpress.Pdf;
using System.Drawing;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
    PdfPage page = processor.AddNewPage(PdfPaperSize.A4);
        using (PdfGraphics graphics = processor.CreateGraphics())
            // Fill an ellipse.
            using (var brush = new SolidBrush(Color.Blue))
                graphics.FillEllipse(brush, new RectangleF(50, 50, 500, 300));

            // Add graphics content to the document page.
            graphics.AddToPageForeground(page, 72, 72);
See Also