Struct Quad
A quadrilateral defined by four corner points in PDF user-space units. Used by text-markup annotations (/QuadPoints entry, spec §8.4.4). The points are ordered: P1 (bottom-left), P2 (bottom-right), P3 (top-left), P4 (top-right).
Implements
Inherited Members
Namespace: DRIT.Pdf.Annotations
Assembly: DRIT.Pdf.dll
Syntax
public readonly struct Quad : IEquatable<Quad>
Constructors
Quad(PdfPoint, PdfPoint, PdfPoint, PdfPoint)
Initializes a quad from four corner points.
Declaration
public Quad(PdfPoint p1, PdfPoint p2, PdfPoint p3, PdfPoint p4)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfPoint | p1 | |
| PdfPoint | p2 | |
| PdfPoint | p3 | |
| PdfPoint | p4 |
Quad(double, double, double, double)
Initializes a quad from an axis-aligned rectangle. P1 = (left, bottom), P2 = (right, bottom), P3 = (left, top), P4 = (right, top).
Declaration
public Quad(double left, double bottom, double right, double top)
Parameters
| Type | Name | Description |
|---|---|---|
| double | left | |
| double | bottom | |
| double | right | |
| double | top |
Properties
Bounds
Gets the bounding rectangle of this quad.
Declaration
public PdfRect Bounds { get; }
Property Value
| Type | Description |
|---|---|
| PdfRect |
P1
Gets the first corner point (bottom-left).
Declaration
public PdfPoint P1 { get; }
Property Value
| Type | Description |
|---|---|
| PdfPoint |
P2
Gets the second corner point (bottom-right).
Declaration
public PdfPoint P2 { get; }
Property Value
| Type | Description |
|---|---|
| PdfPoint |
P3
Gets the third corner point (top-left).
Declaration
public PdfPoint P3 { get; }
Property Value
| Type | Description |
|---|---|
| PdfPoint |
P4
Gets the fourth corner point (top-right).
Declaration
public PdfPoint P4 { get; }
Property Value
| Type | Description |
|---|---|
| PdfPoint |
Methods
Equals(Quad)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(Quad other)
Parameters
| Type | Name | Description |
|---|---|---|
| Quad | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current instance. |
Returns
| Type | Description |
|---|---|
| bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The fully qualified type name. |
Overrides
Operators
operator ==(Quad, Quad)
Indicates whether two quads are equal.
Declaration
public static bool operator ==(Quad a, Quad b)
Parameters
| Type | Name | Description |
|---|---|---|
| Quad | a | |
| Quad | b |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(Quad, Quad)
Indicates whether two quads are not equal.
Declaration
public static bool operator !=(Quad a, Quad b)
Parameters
| Type | Name | Description |
|---|---|---|
| Quad | a | |
| Quad | b |
Returns
| Type | Description |
|---|---|
| bool |