PdfSharp-WPF  1.31.7289
PdfSharp.Pdf.PdfRectangle Class Reference

Represents a PDF rectangle value, that is internally an array with 4 real values. More...

Inheritance diagram for PdfSharp.Pdf.PdfRectangle:
PdfSharp.Pdf.PdfItem

Public Member Functions

 PdfRectangle ()
 Initializes a new instance of the PdfRectangle class. More...
 
 PdfRectangle (XPoint pt1, XPoint pt2)
 Initializes a new instance of the PdfRectangle class with two points specifying two diagonally opposite corners. More...
 
 PdfRectangle (XPoint pt, XSize size)
 Initializes a new instance of the PdfRectangle class with the specified location and size. More...
 
 PdfRectangle (XRect rect)
 Initializes a new instance of the PdfRectangle class with the specified XRect. More...
 
new PdfRectangle Clone ()
 Clones this instance. More...
 
override bool Equals (object obj)
 Tests whether the specified object is a PdfRectangle and has equal coordinates. More...
 
override int GetHashCode ()
 Serves as a hash function for a particular type. More...
 
bool Contains (XPoint pt)
 Determines if the specified point is contained within this PdfRectangle. More...
 
bool Contains (double x, double y)
 Determines if the specified point is contained within this PdfRectangle. More...
 
bool Contains (XRect rect)
 Determines if the rectangular region represented by rect is entirely contained within this PdfRectangle. More...
 
bool Contains (PdfRectangle rect)
 Determines if the rectangular region represented by rect is entirely contained within this PdfRectangle. More...
 
XRect ToXRect ()
 Returns the rectangle as an XRect object. More...
 
override string ToString ()
 Returns the rectangle as a string in the form «[x1 y1 x2 y2]». More...
 
- Public Member Functions inherited from PdfSharp.Pdf.PdfItem
PdfItem Clone ()
 Creates a copy of this object. More...
 

Static Public Member Functions

static bool operator== (PdfRectangle left, PdfRectangle right)
 Tests whether two structures have equal coordinates. More...
 
static bool operator!= (PdfRectangle left, PdfRectangle right)
 Tests whether two structures differ in one or more coordinates. More...
 

Static Public Attributes

static readonly PdfRectangle Empty = new PdfRectangle()
 Represents an empty PdfRectangle. More...
 

Protected Member Functions

override object Copy ()
 Implements cloning this instance. More...
 

Properties

bool IsEmpty [get]
 Tests whether all coordinate are zero. More...
 
double X1 [get]
 Gets or sets the x-coordinate of the first corner of this PdfRectangle. More...
 
double Y1 [get]
 Gets or sets the y-coordinate of the first corner of this PdfRectangle. More...
 
double X2 [get]
 Gets or sets the x-coordinate of the second corner of this PdfRectangle. More...
 
double Y2 [get]
 Gets or sets the y-coordinate of the second corner of this PdfRectangle. More...
 
double Width [get]
 Gets X2 - X1. More...
 
double Height [get]
 Gets Y2 - Y1. More...
 
XPoint Location [get]
 Gets or sets the coordinates of the first point of this PdfRectangle. More...
 
XSize Size [get]
 Gets or sets the size of this PdfRectangle. More...
 

Detailed Description

Represents a PDF rectangle value, that is internally an array with 4 real values.

Constructor & Destructor Documentation

◆ PdfRectangle() [1/4]

PdfSharp.Pdf.PdfRectangle.PdfRectangle ( )

Initializes a new instance of the PdfRectangle class.

◆ PdfRectangle() [2/4]

PdfSharp.Pdf.PdfRectangle.PdfRectangle ( XPoint  pt1,
XPoint  pt2 
)

Initializes a new instance of the PdfRectangle class with two points specifying two diagonally opposite corners.

◆ PdfRectangle() [3/4]

PdfSharp.Pdf.PdfRectangle.PdfRectangle ( XPoint  pt,
XSize  size 
)

Initializes a new instance of the PdfRectangle class with the specified location and size.

◆ PdfRectangle() [4/4]

PdfSharp.Pdf.PdfRectangle.PdfRectangle ( XRect  rect)

Initializes a new instance of the PdfRectangle class with the specified XRect.

Member Function Documentation

◆ Clone()

new PdfRectangle PdfSharp.Pdf.PdfRectangle.Clone ( )

Clones this instance.

◆ Contains() [1/4]

bool PdfSharp.Pdf.PdfRectangle.Contains ( double  x,
double  y 
)

Determines if the specified point is contained within this PdfRectangle.

◆ Contains() [2/4]

bool PdfSharp.Pdf.PdfRectangle.Contains ( PdfRectangle  rect)

Determines if the rectangular region represented by rect is entirely contained within this PdfRectangle.

◆ Contains() [3/4]

bool PdfSharp.Pdf.PdfRectangle.Contains ( XPoint  pt)

Determines if the specified point is contained within this PdfRectangle.

◆ Contains() [4/4]

bool PdfSharp.Pdf.PdfRectangle.Contains ( XRect  rect)

Determines if the rectangular region represented by rect is entirely contained within this PdfRectangle.

◆ Copy()

override object PdfSharp.Pdf.PdfRectangle.Copy ( )
protectedvirtual

Implements cloning this instance.

Reimplemented from PdfSharp.Pdf.PdfItem.

◆ Equals()

override bool PdfSharp.Pdf.PdfRectangle.Equals ( object  obj)

Tests whether the specified object is a PdfRectangle and has equal coordinates.

◆ GetHashCode()

override int PdfSharp.Pdf.PdfRectangle.GetHashCode ( )

Serves as a hash function for a particular type.

◆ operator!=()

static bool PdfSharp.Pdf.PdfRectangle.operator!= ( PdfRectangle  left,
PdfRectangle  right 
)
static

Tests whether two structures differ in one or more coordinates.

◆ operator==()

static bool PdfSharp.Pdf.PdfRectangle.operator== ( PdfRectangle  left,
PdfRectangle  right 
)
static

Tests whether two structures have equal coordinates.

◆ ToString()

override string PdfSharp.Pdf.PdfRectangle.ToString ( )

Returns the rectangle as a string in the form «[x1 y1 x2 y2]».

◆ ToXRect()

XRect PdfSharp.Pdf.PdfRectangle.ToXRect ( )

Returns the rectangle as an XRect object.

Member Data Documentation

◆ Empty

readonly PdfRectangle PdfSharp.Pdf.PdfRectangle.Empty = new PdfRectangle()
static

Represents an empty PdfRectangle.

Property Documentation

◆ Height

double PdfSharp.Pdf.PdfRectangle.Height
get

Gets Y2 - Y1.

◆ IsEmpty

bool PdfSharp.Pdf.PdfRectangle.IsEmpty
get

Tests whether all coordinate are zero.

◆ Location

XPoint PdfSharp.Pdf.PdfRectangle.Location
get

Gets or sets the coordinates of the first point of this PdfRectangle.

◆ Size

XSize PdfSharp.Pdf.PdfRectangle.Size
get

Gets or sets the size of this PdfRectangle.

◆ Width

double PdfSharp.Pdf.PdfRectangle.Width
get

Gets X2 - X1.

◆ X1

double PdfSharp.Pdf.PdfRectangle.X1
get

Gets or sets the x-coordinate of the first corner of this PdfRectangle.

◆ X2

double PdfSharp.Pdf.PdfRectangle.X2
get

Gets or sets the x-coordinate of the second corner of this PdfRectangle.

◆ Y1

double PdfSharp.Pdf.PdfRectangle.Y1
get

Gets or sets the y-coordinate of the first corner of this PdfRectangle.

◆ Y2

double PdfSharp.Pdf.PdfRectangle.Y2
get

Gets or sets the y-coordinate of the second corner of this PdfRectangle.


The documentation for this class was generated from the following file: