| LineAnnotationCreate Method |
Create a line annotation.
The returned line annotation is not yet part of any page.
It can be added to a page's list of annotations.
Namespace: PdfTools.Toolbox.Pdf.AnnotationsAssembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.0.0+fdabb036503e9f99735634a6d4f5be875399e9f5
Syntax public static LineAnnotation Create(
Document targetDocument,
Point start,
Point end,
Stroke stroke
)
Parameters
- targetDocument Document
-
The output document with which the returned object is associated.
- start Point
-
The line's start point.
- end Point
-
The line's end point.
- stroke Stroke
-
The stroking parameters used for stroking the line.
The stroking paint is used as the annotation's main paint.
Return Value
LineAnnotation
The newly created line annotation.
Exceptions Exception | Condition |
---|
ArgumentException | if the targetDocument has already been closed |
ArgumentException | if the targetDocument is read-only |
ArgumentException | if the stroke argument is not associated with the targetDocument |
ArgumentException | if the stroke's Paint has a ColorSpace other than a device color space |
ArgumentException | if the stroke's Paint has a non-Transparency with BlendMode other than Normal |
ArgumentException | if the stroke argument's LineCapStyle is other than Butt |
ArgumentException | if the stroke argument's LineJoinStyle is other than Miter |
ArgumentException | if the stroke argument's MiterLimit is other than 10 |
ArgumentException | if the stroke argument's DashPhase is other than 0 |
ArgumentNullException | if targetDocument is . |
ArgumentNullException | if stroke is . |
See Also