Class Polygon

Polygon annotations are used to hand draw polygons on a page. They can contain any number of sides defined by the polygon vertices. If no points are present, the annotation will not be visible.

Inheritance
System.Object
Polygon
Implements
Namespace: PSPDFKit.Pdf.Annotation
Assembly: PSPDFKit.dll
Syntax
public sealed class Polygon : object, IShape, IAnnotation

Properties

AnnotationType

Declaration
public AnnotationType AnnotationType { get; }
Property Value
Type Description
AnnotationType

BoundingBox

Declaration
public Rect BoundingBox { get; set; }
Property Value
Type Description
Windows.Foundation.Rect

CloudyBorderInset

For annotations with a cloudy border it is drawn in a box determined by shrinking the annotation's bounding box by its inset property values.

Declaration
public Rect CloudyBorderInset { get; set; }
Property Value
Type Description
Windows.Foundation.Rect

CloudyBorderIntensity

The annotation is rendered with a cloudy border style if the value greater than 0.

Declaration
public float CloudyBorderIntensity { get; set; }
Property Value
Type Description
System.Single

CreatedAt

Declaration
public DateTimeOffset CreatedAt { get; set; }
Property Value
Type Description
DateTimeOffset

CreatorName

Declaration
public string CreatorName { get; set; }
Property Value
Type Description
System.String

CustomData

Declaration
public JsonObject CustomData { get; set; }
Property Value
Type Description
Windows.Data.Json.JsonObject

FillColor

An optional Windows.UI.Color to fill the polygon interior.

Declaration
public Color? FillColor { get; set; }
Property Value
Type Description
System.Nullable<Windows.UI.Color>

Id

Declaration
public string Id { get; set; }
Property Value
Type Description
System.String

Name

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

NoPrint

Declaration
public bool NoPrint { get; set; }
Property Value
Type Description
System.Boolean

NoView

Declaration
public bool NoView { get; set; }
Property Value
Type Description
System.Boolean

Opacity

Declaration
public float Opacity { get; set; }
Property Value
Type Description
System.Single

PageIndex

Declaration
public int PageIndex { get; set; }
Property Value
Type Description
System.Int32

PdfObjectId

Declaration
public int? PdfObjectId { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

Points

The points defining the polygon.

Declaration
public IList<Point> Points { get; set; }
Property Value
Type Description
IList<Windows.Foundation.Point>

StrokeColor

Declaration
public Color? StrokeColor { get; set; }
Property Value
Type Description
System.Nullable<Windows.UI.Color>

StrokeDashArray

Declaration
public IList<int> StrokeDashArray { get; set; }
Property Value
Type Description
IList<System.Int32>

StrokeWidth

Declaration
public float StrokeWidth { get; set; }
Property Value
Type Description
System.Single

UpdatedAt

Declaration
public DateTimeOffset UpdatedAt { get; set; }
Property Value
Type Description
DateTimeOffset

Version

Declaration
public int Version { get; }
Property Value
Type Description
System.Int32

Methods

FromJson(JsonObject)

Constructs the IAnnotation from the Instant JSON representing it. See https://pspdfkit.com/guides/server/current/document/json-format/ If any mandatory properties are missing then an exception will be thrown.

Declaration
public static IAnnotation FromJson(JsonObject json)
Parameters
Type Name Description
Windows.Data.Json.JsonObject json

The Instant JSON representing the IAnnotation.

Returns
Type Description
IAnnotation

The IAnnotation represented by the Instant JSON.

FromPartialJson(JsonObject)

Constructs the IAnnotation from the Instant JSON representing it. See https://pspdfkit.com/guides/server/current/document/json-format/ This method does not require mandatory properties to be present in the JSON. Instead appropriate default values will be used.

Declaration
public static IAnnotation FromPartialJson(JsonObject json)
Parameters
Type Name Description
Windows.Data.Json.JsonObject json

The Instant JSON or partial Instant JSON representing the IAnnotation

Returns
Type Description
IAnnotation

The IAnnotation represented by the Instant JSON.

ToJson()

Declaration
public JsonObject ToJson()
Returns
Type Description
Windows.Data.Json.JsonObject

Implements

IShape
IAnnotation

See Also