Class PdfExtend
Specifies the constant values specifying whether to extend the shading beyond the starting and ending points of the axis.
Inheritance
System.Object
PdfExtend
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public sealed class PdfExtend : Enum
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)
Fields
Both
Extend both start and end points.
Declaration
public const PdfExtend Both
Field Value
Type |
---|
PdfExtend |
End
Extend end point.
Declaration
public const PdfExtend End
Field Value
Type |
---|
PdfExtend |
None
Do not extend any point.
Declaration
public const PdfExtend None
Field Value
Type |
---|
PdfExtend |
Start
Extend start point.
Declaration
public const PdfExtend Start
Field Value
Type |
---|
PdfExtend |