PdfPencilMarkAnnotation Class
An ink annotation (PDF 1.3) represents a freehand "scribble" composed of one or more disjoint paths.
public sealed class PdfPencilMarkAnnotation : PdfMarkupAnnotation
Public NotInheritable Class PdfPencilMarkAnnotation
Inherits PdfMarkupAnnotation
- Inheritance:
- System.ObjectPdfPencilMarkAnnotation
Properties
AnnotationType
Gets the Ink value.
public override PdfAnnotationType AnnotationType { get; }
Public Overrides ReadOnly Property AnnotationType As PdfAnnotationType
Property Value
The Ink value.
Overrides
Appearance
Gets the appearance settings for this PdfPencilMarkAnnotation.
public PdfPencilMarkAppearance Appearance { get; }
Public ReadOnly Property Appearance As PdfPencilMarkAppearance
Property Value
The appearance settings for this PdfPencilMarkAnnotation.
Subpaths
Gets the subpaths that this PdfPencilMarkAnnotation is made up of.
public PdfSubpathCollection Subpaths { get; }
Public ReadOnly Property Subpaths As PdfSubpathCollection
Property Value
The subpaths that this PdfPencilMarkAnnotation is made up of.
Methods
ArcTo(PdfSize, PdfPoint, Boolean, Boolean, Double)
Adds a elliptic arc to the end of the Segments of the last PdfSubpath in the Subpaths.
note
PDF doesn't natively support elliptic arcs so the arc is approximated with one to four Bézier curves.
public PdfPencilMarkAnnotation ArcTo(PdfSize radius, PdfPoint endPoint, bool isSweepDirectionClockwise = false, bool isLargeArc = false, double rotationAngle = 0)
Public Function ArcTo(radius As PdfSize, endPoint As PdfPoint, isSweepDirectionClockwise As Boolean = False, isLargeArc As Boolean = False, rotationAngle As Double = 0) As PdfPencilMarkAnnotation
Parameters
radius
- PdfSize
The radii (half the width and half the height) of an oval whose perimeter is used to draw the angle.
endPoint
- PdfPoint
The destination point for the end of the arc.
isSweepDirectionClockwise
- System.Boolean
A value that indicates whether the arc is drawn in the clockwise (positive-angle) or counter clockwise (negative-angle) direction.
isLargeArc
- System.Boolean
true to draw the arc greater than 180 degrees; otherwise, false.
rotationAngle
- System.Double
The rotation angle of the oval that specifies the curve. The curvature of the arc can be rotated with this parameter.
Returns
A reference to this instance after the operation has completed.
See Also
ArcTo(Double, Double, Double, Double, Boolean, Boolean, Double)
Adds a elliptic arc to the end of the Segments of the last PdfSubpath in the Subpaths.
note
PDF doesn't natively support elliptic arcs so the arc is approximated with one to four Bézier curves.
public PdfPencilMarkAnnotation ArcTo(double radiusX, double radiusY, double endPointX, double endPointY, bool isSweepDirectionClockwise = false, bool isLargeArc = false, double rotationAngle = 0)
Public Function ArcTo(radiusX As Double, radiusY As Double, endPointX As Double, endPointY As Double, isSweepDirectionClockwise As Boolean = False, isLargeArc As Boolean = False, rotationAngle As Double = 0) As PdfPencilMarkAnnotation
Parameters
radiusX
- System.Double
The horizontal radius of an oval whose perimeter is used to draw the angle.
radiusY
- System.Double
The vertical radius of an oval whose perimeter is used to draw the angle.
endPointX
- System.Double
The X-coordinate value of the destination point for the end of the arc.
endPointY
- System.Double
The Y-coordinate value of the destination point for the end of the arc.
isSweepDirectionClockwise
- System.Boolean
A value that indicates whether the arc is drawn in the clockwise (positive-angle) or counter clockwise (negative-angle) direction.
isLargeArc
- System.Boolean
true to draw the arc greater than 180 degrees; otherwise, false.
rotationAngle
- System.Double
The rotation angle of the oval that specifies the curve. The curvature of the arc can be rotated with this parameter.
Returns
A reference to this instance after the operation has completed.
Exceptions
- System.ArgumentException
radiusX
, radiusY
, endPointX
, or endPointY
is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
- System.ArgumentOutOfRangeException
radiusX
or radiusY
is less than zero.
See Also
BeginSubpath(PdfPoint)
Begin a new subpath.
public PdfPencilMarkAnnotation BeginSubpath(PdfPoint startPoint)
Public Function BeginSubpath(startPoint As PdfPoint) As PdfPencilMarkAnnotation
Parameters
startPoint
- PdfPoint
The PdfPoint where the PdfSubpath begins.
Returns
A reference to this instance after the operation has completed.
See Also
BeginSubpath(Double, Double)
Begin a new subpath.
public PdfPencilMarkAnnotation BeginSubpath(double startPointX, double startPointY)
Public Function BeginSubpath(startPointX As Double, startPointY As Double) As PdfPencilMarkAnnotation
Parameters
startPointX
- System.Double
The X-coordinate value of PdfPoint where the PdfSubpath begins.
startPointY
- System.Double
The Y-coordinate value of PdfPoint where the PdfSubpath begins.
Returns
A reference to this instance after the operation has completed.
Exceptions
- System.ArgumentException
startPointX
or startPointY
is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
See Also
BezierTo(PdfPoint, PdfPoint, PdfPoint)
Adds a cubic Bézier curve to the end of the Segments of the last PdfSubpath in the Subpaths.
public PdfPencilMarkAnnotation BezierTo(PdfPoint controlPoint1, PdfPoint controlPoint2, PdfPoint endPoint)
Public Function BezierTo(controlPoint1 As PdfPoint, controlPoint2 As PdfPoint, endPoint As PdfPoint) As PdfPencilMarkAnnotation
Parameters
controlPoint1
- PdfPoint
The first control point of the curved line segment.
controlPoint2
- PdfPoint
The second control point of the curved line segment.
endPoint
- PdfPoint
The end point of the curved line segment.
Returns
A reference to this instance after the operation has completed.
Exceptions
- System.InvalidOperationException
The PdfPencilMarkAnnotation doesn't contain any PdfSubpath. Use BeginSubpath(PdfPoint) method before using the current method.
See Also
BezierTo(Double, Double, Double, Double, Double, Double)
Adds a cubic Bézier curve to the end of the Segments of the last PdfSubpath in the Subpaths.
public PdfPencilMarkAnnotation BezierTo(double controlPoint1X, double controlPoint1Y, double controlPoint2X, double controlPoint2Y, double endPointX, double endPointY)
Public Function BezierTo(controlPoint1X As Double, controlPoint1Y As Double, controlPoint2X As Double, controlPoint2Y As Double, endPointX As Double, endPointY As Double) As PdfPencilMarkAnnotation
Parameters
controlPoint1X
- System.Double
The X-coordinate value of the first control point of the curved line segment.
controlPoint1Y
- System.Double
The Y-coordinate value of the first control point of the curved line segment.
controlPoint2X
- System.Double
The X-coordinate value of the second control point of the curved line segment.
controlPoint2Y
- System.Double
The Y-coordinate value of the second control point of the curved line segment.
endPointX
- System.Double
The X-coordinate value of the end point of the curved line segment.
endPointY
- System.Double
The Y-coordinate value of the end point of the curved line segment.
Returns
A reference to this instance after the operation has completed.
Exceptions
- System.ArgumentException
controlPoint1X
, controlPoint1Y
, controlPoint2X
, controlPoint2Y
, endPointX
, or endPointY
is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
- System.InvalidOperationException
The PdfPencilMarkAnnotation doesn't contain any PdfSubpath. Use BeginSubpath(PdfPoint) method before using the current method.
See Also
LineTo(PdfPoint)
Adds a straight line to the end of the Segments of the last PdfSubpath in the Subpaths.
public PdfPencilMarkAnnotation LineTo(PdfPoint endPoint)
Public Function LineTo(endPoint As PdfPoint) As PdfPencilMarkAnnotation
Parameters
endPoint
- PdfPoint
The end point of the straight line segment.
Returns
A reference to this instance after the operation has completed.
Exceptions
- System.InvalidOperationException
The PdfPencilMarkAnnotation doesn't contain any PdfSubpath. Use BeginSubpath(PdfPoint) method before using the current method.
See Also
LineTo(Double, Double)
Adds a straight line to the end of the Segments of the last PdfSubpath in the Subpaths.
public PdfPencilMarkAnnotation LineTo(double endPointX, double endPointY)
Public Function LineTo(endPointX As Double, endPointY As Double) As PdfPencilMarkAnnotation
Parameters
endPointX
- System.Double
The X-coordinate value of the end point of the straight line segment.
endPointY
- System.Double
The Y-coordinate value of the end point of the straight line segment.
Returns
A reference to this instance after the operation has completed.
Exceptions
- System.ArgumentException
endPointX
or endPointY
is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.
- System.InvalidOperationException
The PdfPencilMarkAnnotation doesn't contain any PdfSubpath. Use BeginSubpath(PdfPoint) method before using the current method.
See Also
Inherited Properties
AssociatedFiles | (Optional; PDF 2.0) An array of one or more PdfFileSpecifications which denote the associated files for this PdfAnnotation. (Inherited from PdfAnnotation) |
Author | (Optional; PDF 1.1) The text label that shall be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation. (Inherited from PdfMarkupAnnotation) |
Bounds | (Required) The annotation bounds, defining the location and the size of the annotation on the page in default user space units. (Inherited from PdfAnnotation) |
InReplyTo | (Required if a ReplyType entry is present, otherwise optional; PDF 1.5) A reference to the PdfMarkupAnnotation that this PdfMarkupAnnotation is "in reply to". Both PdfMarkupAnnotations shall be on the same page of the document. The relationship between the two PdfMarkupAnnotations shall be specified by the ReplyType entry. (Inherited from PdfMarkupAnnotation) |
Intent | (Optional; PDF 1.6) A name describing the intent of the markup annotation. Intents allow conforming readers to distinguish between different uses and behaviors of a single markup annotation type. PdfFreeTextAnnotations (Table 174), line annotations (Table 175), polygon annotations (Table 178), and (PDF 1.7) polyline annotations (Table 178) have defined intents. (Inherited from PdfMarkupAnnotation) |
Locked | (PDF 1.4) If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field. (Inherited from PdfAnnotation) |
Metadata | (Optional; PDF 1.4) A metadata stream containing metadata for the component. (Inherited from PdfObject) |
Page | Gets the page with which this annotation is associated. (Inherited from PdfAnnotation) |
ReplyType | (Optional; meaningful only if InReplyTo is present; PDF 1.6) A name specifying the relationship (the "reply type") between this PdfMarkupAnnotation and the one specified by the InReplyTo property. Default value: Reply. (Inherited from PdfMarkupAnnotation) |
Subject | (Optional; PDF 1.5) Text representing a short description of the subject being addressed by the annotation. (Inherited from PdfMarkupAnnotation) |
Inherited Methods
SetBounds(System.Double, System.Double) | Sets the size of the Bounds. (Inherited from PdfAnnotation) |
SetBounds(System.Double, System.Double, System.Double, System.Double) | Sets the Bounds. (Inherited from PdfAnnotation) |