Table of Contents

Enum PdfExtend

Namespace
Syncfusion.Pdf.Graphics
Assembly
Syncfusion.Pdf.Portable.dll

Specifies the constant values specifying whether to extend the shading beyond the starting and ending points of the axis.

[Flags]
public enum PdfExtend

Fields

Both = Start | End

Extend both start and end points.

End = 2

Extend end point.

None = 0

Do not extend any point.

Start = 1

Extend start point.

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;
//Create new PDF gradient brush.  
PdfRadialGradientBrush brush = new PdfRadialGradientBrush(new PointF(50, 50), 0, new PointF(50, 50), 50, Color.Red, Color.Blue);
//Set the extend mode.
brush.Extend = PdfExtend.Both;
//Draw the ellipse.
graphics.DrawEllipse(brush, new RectangleF(0, 0, 100, 100));           
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics
'Create new PDF gradient brush.           
Dim brush As New PdfRadialGradientBrush(New PointF(50, 50), 0, New PointF(50, 50), 50, Color.Red, Color.Blue)
 'Set the extend mode.
brush.Extend = PdfExtend.Both
'Draw the ellipse.
graphics.DrawEllipse(brush, New RectangleF(0, 0, 100, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)