PdfCircleMeasurementAnnotation Class
Represents the annotation with Circle Measurement.
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfCircleMeasurementAnnotation : PdfAnnotation, IPdfWrapper, INotifyPropertyChanged
Constructors
PdfCircleMeasurementAnnotation(RectangleF)
Initializes new instance of PdfCircleMeasurementAnnotation class with bounds.
Declaration
public PdfCircleMeasurementAnnotation(RectangleF rectangle)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rectangle | Used to represent the bounds of the annotation |
Properties
Border
Get or set the border style of the circle annotaion.
Declaration
public LineBorder Border { get; set; }
Property Value
Type |
---|
LineBorder |
Comments
Gets the annotation comments
Declaration
public PdfPopupAnnotationCollection Comments { get; }
Property Value
Type |
---|
PdfPopupAnnotationCollection |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
RectangleF rectangle = new RectangleF(10, 100, 100, 100);
//Create a new line annotation and set properties.
PdfCircleMeasurementAnnotation circleMeasureAnnotation = new PdfCircleMeasurementAnnotation(rectangle);
//Assign author to the circle measurement annotation
circleMeasureAnnotation.Author = "Syncfusion";
//Assign subject to the circle measurement annotation
circleMeasureAnnotation.Subject = "Circle measurement annotation";
//Assign color to the square measurement annotation
circleMeasureAnnotation.Color = new PdfColor(Color.Red);
//Assign measurement unit to the circle measurement annotation
circleMeasureAnnotation.Unit = PdfMeasurementUnit.Centimeter;
//Sets the measurementType to the circle measurement annotation
circleMeasureAnnotation.MeasurementType = PdfCircleMeasurementType.Diameter;
//Add comment state
PdfPopupAnnotation popupComments = new PdfPopupAnnotation();
popupComments.Author = "TestAuthor";
popupComments.Text = "Test Text";
circleMeasureAnnotation.Comments.Add(popupComments);
//Get annotation comments
PdfPopupAnnotationCollection commentsCollection = circleMeasureAnnotation.Comments;
page.Annotations.Add(circleMeasureAnnotation);
//Saves the document to disk.
document.Save("Output.pdf");
document.Close(true);
'Creates a new PDF document
Dim document As New PdfDocument()
'Creates a new page
Dim page As PdfPage = document.Pages.Add()
Dim rect As New RectangleF(10, 100, 100, 100)
'Creates the circle measurement annotation
Dim circleMeasureAnnotation As New PdfCircleMeasurementAnnotation(rect)
'Assign author to the circle measurement annotation
circleMeasureAnnotation.Author = "Syncfusion"
'Assign subject to the circle measurement annotation
circleMeasureAnnotation.Subject = "Circle measurement annotation"
'Assign color to the square measurement annotation
circleMeasureAnnotation.Color = New PdfColor(Color.Red)
'Assign measurement unit to the circle measurement annotation
circleMeasureAnnotation.Unit = PdfMeasurementUnit.Centimeter
'Sets the measurementType to the circle measurement annotation
circleMeasureAnnotation.MeasurementType = PdfCircleMeasurementType.Diameter
Dim popupComments As PdfPopupAnnotation = New PdfPopupAnnotation
popupComments.Author = "TestAuthor"
popupComments.Text = "Test Text"
circleMeasureAnnotation.Comments.Add(popupComments)
Dim commentsCollection As PdfPopupAnnotationCollection = circleMeasureAnnotation.Comments
page.Annotations.Add(circleMeasureAnnotation)
'Saves the document to disk.
document.Save("Output.pdf")
document.Close(true)
Font
Gets or sets the font of the text annotation
Declaration
public PdfFont Font { get; set; }
Property Value
Type |
---|
PdfFont |
MeasurementType
Get or set the PdfCircleMeasurementType
Declaration
public PdfCircleMeasurementType MeasurementType { get; set; }
Property Value
Type |
---|
PdfCircleMeasurementType |
ReviewHistory
Gets the annotation reviews
Declaration
public PdfPopupAnnotationCollection ReviewHistory { get; }
Property Value
Type |
---|
PdfPopupAnnotationCollection |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
RectangleF rectangle = new RectangleF(10, 100, 100, 100);
//Create a new line annotation and set properties.
PdfCircleMeasurementAnnotation circleMeasureAnnotation = new PdfCircleMeasurementAnnotation(rectangle);
//Assign author to the circle measurement annotation
circleMeasureAnnotation.Author = "Syncfusion";
//Assign subject to the circle measurement annotation
circleMeasureAnnotation.Subject = "Circle measurement annotation";
//Assign color to the square measurement annotation
circleMeasureAnnotation.Color = new PdfColor(Color.Red);
//Assign measurement unit to the circle measurement annotation
circleMeasureAnnotation.Unit = PdfMeasurementUnit.Centimeter;
//Sets the measurementType to the circle measurement annotation
circleMeasureAnnotation.MeasurementType = PdfCircleMeasurementType.Diameter;
//Add Review state
PdfPopupAnnotation popup = new PdfPopupAnnotation();
popup.State = PdfAnnotationState.Accepted;
popup.StateModel = PdfAnnotationStateModel.Review;
popup.Text = "Hello PDF Comments";
popup.Author = "Test1";
circleMeasureAnnotation.ReviewHistory.Add(popup);
//Get Review history
PdfPopupAnnotationCollection reviewCollection = circleMeasureAnnotation.ReviewHistory;
page.Annotations.Add(circleMeasureAnnotation);
//Saves the document to disk.
document.Save("Output.pdf");
document.Close(true);
'Creates a new PDF document
Dim document As New PdfDocument()
'Creates a new page
Dim page As PdfPage = document.Pages.Add()
Dim rect As New RectangleF(10, 100, 100, 100)
'Creates the circle measurement annotation
Dim circleMeasureAnnotation As New PdfCircleMeasurementAnnotation(rect)
'Assign author to the circle measurement annotation
circleMeasureAnnotation.Author = "Syncfusion"
'Assign subject to the circle measurement annotation
circleMeasureAnnotation.Subject = "Circle measurement annotation"
'Assign color to the square measurement annotation
circleMeasureAnnotation.Color = New PdfColor(Color.Red)
'Assign measurement unit to the circle measurement annotation
circleMeasureAnnotation.Unit = PdfMeasurementUnit.Centimeter
'Sets the measurementType to the circle measurement annotation
circleMeasureAnnotation.MeasurementType = PdfCircleMeasurementType.Diameter
Dim popup As PdfPopupAnnotation = New PdfPopupAnnotation
popup.State = PdfAnnotationState.Accepted
popup.StateModel = PdfAnnotationStateModel.Review
popup.Text = "Hello PDF Comments"
popup.Author = "Test1"
circleMeasureAnnotation.ReviewHistory.Add(popup)
Dim reviewCollection As PdfPopupAnnotationCollection = circleMeasureAnnotation.ReviewHistory
page.Annotations.Add(circleMeasureAnnotation)
'Saves the document to disk.
document.Save("Output.pdf")
document.Close(true)
Unit
Get or set PdfMeasurement Unit.
Declaration
public PdfMeasurementUnit Unit { get; set; }
Property Value
Type |
---|
PdfMeasurementUnit |
Methods
Initialize()
Initializes annotation object.
Declaration
protected override void Initialize()
Overrides
Save()
Saves an annotation.
Declaration
protected override void Save()
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged