Skip to main content

Circle

Version: 12.0

cete.dynamicpdf.pageelements.circle

Circle​

Represents a circle.

public class Circle : TaggablePageElement, ISerializable
Public Class Circle
Inherits TaggablePageElement
Implements ISerializable

Inheritance: Object → PageElement → TaggablePageElement → Circle

Implements: ISerializable

Licensing Info​

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples​

The following example will place two circles on the page with different size, shape and colors.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule

Sub Main()

' Create a PDF Document
Dim MyDocument As Document = New Document

' Create a Page and add it to the document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)

' Create two circles
Dim circle1 As Circle = New Circle(100, 100, 50, 100, Grayscale.Black, _
RgbColor.OrangeRed, 2, LineStyle.Solid)
Dim circle2 As Circle = New Circle(150, 75, 50, 50, Grayscale.Black, _
RgbColor.Lime, 2, LineStyle.Solid)

' Add the circles to the page
MyPage.Elements.Add(circle1)
MyPage.Elements.Add(circle2)

' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")

End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
public static void CreatePDF(string outputPath)
{
// Create a PDF Document
Document document = new Document();

// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add( page );

// Create two circles
Circle circle1 = new Circle(100, 100, 50, 100, Grayscale.Black, RgbColor.OrangeRed, 2, LineStyle.Solid);
Circle circle2 = new Circle(150, 75, 50, 50, Grayscale.Black, RgbColor.Lime, 2, LineStyle.Solid);

// Add the circles to the page
page.Elements.Add( circle1 );
page.Elements.Add( circle2 );

// Save the PDF
document.Draw( outputPath );
}
}

Remarks​

This class can be used to place circles on a page.

Constructors​

Circle(Single, Single, Single)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radius)
Public Sub New (x As Single, y As Single, radius As Single)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Radius of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Circle(Single, Single, Single, Color)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radius, Color borderColor)
Public Sub New (x As Single, y As Single, radius As Single, borderColor As Color)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Radius of the circle.

Color of the border of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Circle(Single, Single, Single, Color, Color)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radius, Color borderColor, Color fillColor)
Public Sub New (x As Single, y As Single, radius As Single, borderColor As Color, fillColor As Color)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Radius of the circle.

Color of the border of the circle.

Fill color of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Circle(Single, Single, Single, Color, Color, Single)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radius, Color borderColor, Color fillColor, float borderWidth)
Public Sub New (x As Single, y As Single, radius As Single, borderColor As Color, fillColor As Color, borderWidth As Single)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Radius of the circle.

Color of the border of the circle.

Fill color of the circle.

Width of the border of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Circle(Single, Single, Single, Color, Color, Single, LineStyle)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radius, Color borderColor, Color fillColor, float borderWidth, LineStyle borderStyle)
Public Sub New (x As Single, y As Single, radius As Single, borderColor As Color, fillColor As Color, borderWidth As Single, borderStyle As LineStyle)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Radius of the circle.

Color of the border of the circle.

Fill color of the circle.

Width of the border of the circle.

Style of the border of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Circle(Single, Single, Single, Color, Single, LineStyle)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radius, Color borderColor, float borderWidth, LineStyle borderStyle)
Public Sub New (x As Single, y As Single, radius As Single, borderColor As Color, borderWidth As Single, borderStyle As LineStyle)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Radius of the circle.

Color of the border of the circle.

Width of the border of the circle.

Style of the border of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Circle(Single, Single, Single, Single)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radiusX, float radiusY)
Public Sub New (x As Single, y As Single, radiusX As Single, radiusY As Single)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Horizontal radius of the circle.

Vertical radius of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Circle(Single, Single, Single, Single, Color, Color, Single, LineStyle)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radiusX, float radiusY, Color borderColor, Color fillColor, float borderWidth, LineStyle borderStyle)
Public Sub New (x As Single, y As Single, radiusX As Single, radiusY As Single, borderColor As Color, fillColor As Color, borderWidth As Single, borderStyle As LineStyle)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Horizontal radius of the circle.

Vertical radius of the circle.

Color of the border of the circle.

Fill color of the circle.

Width of the border of the circle.

Style of the border of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Circle(Single, Single, Single, Single, LineStyle)​

Initializes a new instance of the Circle class.

public Circle(float x, float y, float radius, float borderWidth, LineStyle borderStyle)
Public Sub New (x As Single, y As Single, radius As Single, borderWidth As Single, borderStyle As LineStyle)

Parameters​

X coordinate of the circle.

Y coordinate of the circle.

Radius of the circle.

Width of the border of the circle.

Style of the border of the circle.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Properties​

BorderColor​

Gets or sets the Color object to use for the border of the circle.

public Color BorderColor { get; set; }
Public Property BorderColor As Color

Property Value​

Color

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

BorderStyle​

Gets or sets the LineStyle object that represents the border style of the circle.

public LineStyle BorderStyle { get; set; }
Public Property BorderStyle As LineStyle

Property Value​

LineStyle

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

BorderWidth​

Gets or sets the border width of the circle.

public float BorderWidth { get; set; }
Public Property BorderWidth As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Remarks​

To force the borders not to appear set the border width to any value 0 or less.

FillColor​

Gets or sets the Color object to use for the fill of the circle.

public Color FillColor { get; set; }
Public Property FillColor As Color

Property Value​

Color

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Remarks​

To force no color to appear in the rectangle (only borders) set the fill color to null (Nothing in Visual Basic).

ID​

Gets or sets the ID of the page element. (Inherited from PageElement)

public string ID { get; set; }
Public Property ID As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

IgnoreMargins​

Gets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property. (Inherited from PageElement)

public bool IgnoreMargins { get; set; }
Public Property IgnoreMargins As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples​

The following example will place the Label in the top-left of the page with IgnoreMargin

using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
public static void CreatePDF(string outputPath)
{
// Create a PDF Document
Document document = new Document();

// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add(page); // Create an Label and place it in page top left with margin ignored
Label label = new Label("I am placed in Page top left with margin ignored", 0, 0, 160, 30);
label.RelativeTo = RelativeTo.TopLeft;
label.IgnoreMargin=true; page.Elements.Add(label);

// Save the PDF
document.Draw(outputPath);
}
}

RadiusX​

Gets or sets the horizontal radius of the circle.

public float RadiusX { get; set; }
Public Property RadiusX As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

RadiusY​

Gets or sets the vertical radius of the circle.

public float RadiusY { get; set; }
Public Property RadiusY As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

RelativeTo​

Gets and sets placement of the page element on the page. (Inherited from PageElement)

public RelativeTo RelativeTo { get; set; }
Public Property RelativeTo As RelativeTo

Property Value​

RelativeTo

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples​

The following example will place the Label in the top-left of the page.

using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
public static void CreatePDF(string outputPath)
{
// Create a PDF Document
Document document = new Document();

// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add(page); // Create an Label and place it in page top left with margin
Label label = new Label("I am placed in Page top left with margin.", 0, 0, 160, 30);
label.RelativeTo = RelativeTo.TopLeft;
page.Elements.Add(label);

// Save the PDF
document.Draw(outputPath);
}
}

Tag​

Gets or sets the tag of the taggable element. (Inherited from TaggablePageElement)

public Tag Tag { get; set; }
Public Property Tag As Tag

Property Value​

Tag

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

TagOrder​

Gets or sets the tag order of the taggable element. (Inherited from TaggablePageElement)

public int TagOrder { get; set; }
Public Property TagOrder As Int32

Property Value​

Int32

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

X​

Gets or sets the X coordinate of the circle.

public float X { get; set; }
Public Property X As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Y​

Gets or sets the Y coordinate of the circle.

public float Y { get; set; }
Public Property Y As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Methods​

Draw(PageWriter)​

Draws the circle to the given PageWriter object.

public void Draw(PageWriter writer)
Sub Draw(writer As PageWriter)

Parameters​

PageWriter object to receive the circle's output.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

See Also​

ceTe.DynamicPDF.PageElements