PdfGraphics.DrawRectangle(DXPen, RectangleF) Method
In This Article
Draws a rectangle in the specified page area.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v24.2.Drawing.dll
NuGet Package: DevExpress.Pdf.Drawing
#Declaration
public void DrawRectangle(
DXPen pen,
RectangleF bounds
)
#Parameters
Name | Type | Description |
---|---|---|
pen | DXPen | A DXPen object that specifies the color, width, and style of the rectangle. |
bounds | Rectangle |
A Rectangle |
#Remarks
Use this method to draw a rectangle in the page area specified by the bounds parameter.
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.
- PdfDocumentProcessor.RenderNewPage
- Draws content on a new page.
See Also