Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfExtend

    Show / Hide Table of Contents

    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.Portable.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 Description
    PdfExtend

    End

    Extend end point.

    Declaration
    public const PdfExtend End
    Field Value
    Type Description
    PdfExtend

    None

    Do not extend any point.

    Declaration
    public const PdfExtend None
    Field Value
    Type Description
    PdfExtend

    Start

    Extend start point.

    Declaration
    public const PdfExtend Start
    Field Value
    Type Description
    PdfExtend

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved