PdfSharp-WPF  1.31.7289
PdfSharp.Drawing.XRect Struct Reference

Stores a set of four floating-point numbers that represent the location and size of a rectangle. More...

Inheritance diagram for PdfSharp.Drawing.XRect:

Public Member Functions

 XRect (double x, double y, double width, double height)
 Initializes a new instance of the XRect class. More...
 
 XRect (XPoint point1, XPoint point2)
 Initializes a new instance of the XRect class. More...
 
 XRect (XPoint point, XVector vector)
 Initializes a new instance of the XRect class. More...
 
 XRect (XPoint location, XSize size)
 Initializes a new instance of the XRect class. More...
 
 XRect (XSize size)
 Initializes a new instance of the XRect class. More...
 
 XRect (Rect rect)
 Initializes a new instance of the XRect class. More...
 
override bool Equals (object o)
 Determines whether this instance and the specified object are equal. More...
 
bool Equals (XRect value)
 Determines whether this instance and the specified rect are equal. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
override string ToString ()
 Converts this XRect to a human readable string. More...
 
string ToString (IFormatProvider provider)
 Converts this XRect to a human readable string. More...
 
string IFormattable. ToString (string format, IFormatProvider provider)
 Converts this XRect to a human readable string. More...
 
bool Contains (XPoint point)
 Indicates whether the rectangle contains the specified point. More...
 
bool Contains (double x, double y)
 Indicates whether the rectangle contains the specified point. More...
 
bool Contains (XRect rect)
 Indicates whether the rectangle contains the specified rectangle. More...
 
bool IntersectsWith (XRect rect)
 Indicates whether the specified rectangle intersects with the current rectangle. More...
 
void Intersect (XRect rect)
 Sets current rectangle to the intersection of the current rectangle and the specified rectangle. More...
 
void Union (XRect rect)
 Sets current rectangle to the union of the current rectangle and the specified rectangle. More...
 
void Union (XPoint point)
 Sets current rectangle to the union of the current rectangle and the specified point. More...
 
void Offset (XVector offsetVector)
 Moves a rectangle by the specified amount. More...
 
void Offset (double offsetX, double offsetY)
 Moves a rectangle by the specified amount. More...
 
void Inflate (XSize size)
 Expands the rectangle by using the specified Size, in all directions. More...
 
void Inflate (double width, double height)
 Expands or shrinks the rectangle by using the specified width and height amounts, in all directions. More...
 
void Transform (XMatrix matrix)
 Transforms the rectangle by applying the specified matrix. More...
 
void Scale (double scaleX, double scaleY)
 Multiplies the size of the current rectangle by the specified x and y values. More...
 
bool ContainsInternal (double x, double y)
 

Static Public Member Functions

static XRect FromLTRB (double left, double top, double right, double bottom)
 Creates a rectangle from for straight lines. More...
 
static bool operator== (XRect rect1, XRect rect2)
 Determines whether the two rectangles are equal. More...
 
static bool operator!= (XRect rect1, XRect rect2)
 Determines whether the two rectangles are not equal. More...
 
static bool Equals (XRect rect1, XRect rect2)
 Determines whether the two rectangles are equal. More...
 
static XRect Parse (string source)
 Parses the rectangle from a string. More...
 
static XRect Intersect (XRect rect1, XRect rect2)
 Returns the intersection of two rectangles. More...
 
static XRect Union (XRect rect1, XRect rect2)
 Returns the union of two rectangles. More...
 
static XRect Union (XRect rect, XPoint point)
 Returns the intersection of a rectangle and a point. More...
 
static XRect Offset (XRect rect, XVector offsetVector)
 Returns a rectangle that is offset from the specified rectangle by using the specified vector. More...
 
static XRect Offset (XRect rect, double offsetX, double offsetY)
 Returns a rectangle that is offset from the specified rectangle by using specified horizontal and vertical amounts. More...
 
static XRect operator+ (XRect rect, XPoint point)
 Translates the rectangle by adding the specified point. More...
 
static XRect operator- (XRect rect, XPoint point)
 Translates the rectangle by subtracting the specified point. More...
 
static XRect Inflate (XRect rect, XSize size)
 Returns the rectangle that results from expanding the specified rectangle by the specified Size, in all directions. More...
 
static XRect Inflate (XRect rect, double width, double height)
 Creates a rectangle that results from expanding or shrinking the specified rectangle by the specified width and height amounts, in all directions. More...
 
static XRect Transform (XRect rect, XMatrix matrix)
 Returns the rectangle that results from applying the specified matrix to the specified rectangle. More...
 
static implicit operator XRect (Rect rect)
 Performs an implicit conversion from System.Windows.Rect to XRect. More...
 
static XRect CreateEmptyRect ()
 
static XRect ()
 

Properties

static XRect Empty [get]
 Gets the empty rectangle. More...
 
bool IsEmpty [get]
 Gets a value indicating whether this instance is empty. More...
 
XPoint Location [get, set]
 Gets or sets the location of the rectangle. More...
 
XSize Size [get, set]
 Gets or sets the size of the rectangle. More...
 
double X [get, set]
 Gets or sets the X value of the rectangle. More...
 
double Y [get, set]
 Gets or sets the Y value of the rectangle. More...
 
double Width [get, set]
 Gets or sets the width of the rectangle. More...
 
double Height [get, set]
 Gets or sets the height of the rectangle. More...
 
double Left [get]
 Gets the x-axis value of the left side of the rectangle. More...
 
double Top [get]
 Gets the y-axis value of the top side of the rectangle. More...
 
double Right [get]
 Gets the x-axis value of the right side of the rectangle. More...
 
double Bottom [get]
 Gets the y-axis value of the bottom side of the rectangle. More...
 
XPoint TopLeft [get]
 Gets the position of the top-left corner of the rectangle. More...
 
XPoint TopRight [get]
 Gets the position of the top-right corner of the rectangle. More...
 
XPoint BottomLeft [get]
 Gets the position of the bottom-left corner of the rectangle. More...
 
XPoint BottomRight [get]
 Gets the position of the bottom-right corner of the rectangle. More...
 
XPoint Center [get]
 Gets the center of the rectangle. More...
 

Detailed Description

Stores a set of four floating-point numbers that represent the location and size of a rectangle.

Constructor & Destructor Documentation

◆ XRect() [1/7]

PdfSharp.Drawing.XRect.XRect ( double  x,
double  y,
double  width,
double  height 
)

Initializes a new instance of the XRect class.

◆ XRect() [2/7]

PdfSharp.Drawing.XRect.XRect ( XPoint  point1,
XPoint  point2 
)

Initializes a new instance of the XRect class.

◆ XRect() [3/7]

PdfSharp.Drawing.XRect.XRect ( XPoint  point,
XVector  vector 
)

Initializes a new instance of the XRect class.

◆ XRect() [4/7]

PdfSharp.Drawing.XRect.XRect ( XPoint  location,
XSize  size 
)

Initializes a new instance of the XRect class.

◆ XRect() [5/7]

PdfSharp.Drawing.XRect.XRect ( XSize  size)

Initializes a new instance of the XRect class.

◆ XRect() [6/7]

PdfSharp.Drawing.XRect.XRect ( Rect  rect)

Initializes a new instance of the XRect class.

◆ XRect() [7/7]

static PdfSharp.Drawing.XRect.XRect ( )
static

Member Function Documentation

◆ Contains() [1/3]

bool PdfSharp.Drawing.XRect.Contains ( double  x,
double  y 
)

Indicates whether the rectangle contains the specified point.

◆ Contains() [2/3]

bool PdfSharp.Drawing.XRect.Contains ( XPoint  point)

Indicates whether the rectangle contains the specified point.

◆ Contains() [3/3]

bool PdfSharp.Drawing.XRect.Contains ( XRect  rect)

Indicates whether the rectangle contains the specified rectangle.

◆ ContainsInternal()

bool PdfSharp.Drawing.XRect.ContainsInternal ( double  x,
double  y 
)

◆ CreateEmptyRect()

static XRect PdfSharp.Drawing.XRect.CreateEmptyRect ( )
static

◆ Equals() [1/3]

override bool PdfSharp.Drawing.XRect.Equals ( object  o)

Determines whether this instance and the specified object are equal.

◆ Equals() [2/3]

static bool PdfSharp.Drawing.XRect.Equals ( XRect  rect1,
XRect  rect2 
)
static

Determines whether the two rectangles are equal.

◆ Equals() [3/3]

bool PdfSharp.Drawing.XRect.Equals ( XRect  value)

Determines whether this instance and the specified rect are equal.

◆ FromLTRB()

static XRect PdfSharp.Drawing.XRect.FromLTRB ( double  left,
double  top,
double  right,
double  bottom 
)
static

Creates a rectangle from for straight lines.

◆ GetHashCode()

override int PdfSharp.Drawing.XRect.GetHashCode ( )

Returns the hash code for this instance.

◆ Inflate() [1/4]

void PdfSharp.Drawing.XRect.Inflate ( double  width,
double  height 
)

Expands or shrinks the rectangle by using the specified width and height amounts, in all directions.

◆ Inflate() [2/4]

static XRect PdfSharp.Drawing.XRect.Inflate ( XRect  rect,
double  width,
double  height 
)
static

Creates a rectangle that results from expanding or shrinking the specified rectangle by the specified width and height amounts, in all directions.

◆ Inflate() [3/4]

static XRect PdfSharp.Drawing.XRect.Inflate ( XRect  rect,
XSize  size 
)
static

Returns the rectangle that results from expanding the specified rectangle by the specified Size, in all directions.

◆ Inflate() [4/4]

void PdfSharp.Drawing.XRect.Inflate ( XSize  size)

Expands the rectangle by using the specified Size, in all directions.

◆ Intersect() [1/2]

void PdfSharp.Drawing.XRect.Intersect ( XRect  rect)

Sets current rectangle to the intersection of the current rectangle and the specified rectangle.

◆ Intersect() [2/2]

static XRect PdfSharp.Drawing.XRect.Intersect ( XRect  rect1,
XRect  rect2 
)
static

Returns the intersection of two rectangles.

◆ IntersectsWith()

bool PdfSharp.Drawing.XRect.IntersectsWith ( XRect  rect)

Indicates whether the specified rectangle intersects with the current rectangle.

◆ Offset() [1/4]

void PdfSharp.Drawing.XRect.Offset ( double  offsetX,
double  offsetY 
)

Moves a rectangle by the specified amount.

◆ Offset() [2/4]

static XRect PdfSharp.Drawing.XRect.Offset ( XRect  rect,
double  offsetX,
double  offsetY 
)
static

Returns a rectangle that is offset from the specified rectangle by using specified horizontal and vertical amounts.

◆ Offset() [3/4]

static XRect PdfSharp.Drawing.XRect.Offset ( XRect  rect,
XVector  offsetVector 
)
static

Returns a rectangle that is offset from the specified rectangle by using the specified vector.

◆ Offset() [4/4]

void PdfSharp.Drawing.XRect.Offset ( XVector  offsetVector)

Moves a rectangle by the specified amount.

◆ operator XRect()

static implicit PdfSharp.Drawing.XRect.operator XRect ( Rect  rect)
static

Performs an implicit conversion from System.Windows.Rect to XRect.

◆ operator!=()

static bool PdfSharp.Drawing.XRect.operator!= ( XRect  rect1,
XRect  rect2 
)
static

Determines whether the two rectangles are not equal.

◆ operator+()

static XRect PdfSharp.Drawing.XRect.operator+ ( XRect  rect,
XPoint  point 
)
static

Translates the rectangle by adding the specified point.

◆ operator-()

static XRect PdfSharp.Drawing.XRect.operator- ( XRect  rect,
XPoint  point 
)
static

Translates the rectangle by subtracting the specified point.

◆ operator==()

static bool PdfSharp.Drawing.XRect.operator== ( XRect  rect1,
XRect  rect2 
)
static

Determines whether the two rectangles are equal.

◆ Parse()

static XRect PdfSharp.Drawing.XRect.Parse ( string  source)
static

Parses the rectangle from a string.

◆ Scale()

void PdfSharp.Drawing.XRect.Scale ( double  scaleX,
double  scaleY 
)

Multiplies the size of the current rectangle by the specified x and y values.

◆ ToString() [1/3]

override string PdfSharp.Drawing.XRect.ToString ( )

Converts this XRect to a human readable string.

◆ ToString() [2/3]

string PdfSharp.Drawing.XRect.ToString ( IFormatProvider  provider)

Converts this XRect to a human readable string.

◆ ToString() [3/3]

string IFormattable. PdfSharp.Drawing.XRect.ToString ( string  format,
IFormatProvider  provider 
)

Converts this XRect to a human readable string.

◆ Transform() [1/2]

void PdfSharp.Drawing.XRect.Transform ( XMatrix  matrix)

Transforms the rectangle by applying the specified matrix.

◆ Transform() [2/2]

static XRect PdfSharp.Drawing.XRect.Transform ( XRect  rect,
XMatrix  matrix 
)
static

Returns the rectangle that results from applying the specified matrix to the specified rectangle.

◆ Union() [1/4]

void PdfSharp.Drawing.XRect.Union ( XPoint  point)

Sets current rectangle to the union of the current rectangle and the specified point.

◆ Union() [2/4]

void PdfSharp.Drawing.XRect.Union ( XRect  rect)

Sets current rectangle to the union of the current rectangle and the specified rectangle.

◆ Union() [3/4]

static XRect PdfSharp.Drawing.XRect.Union ( XRect  rect,
XPoint  point 
)
static

Returns the intersection of a rectangle and a point.

◆ Union() [4/4]

static XRect PdfSharp.Drawing.XRect.Union ( XRect  rect1,
XRect  rect2 
)
static

Returns the union of two rectangles.

Property Documentation

◆ Bottom

double PdfSharp.Drawing.XRect.Bottom
get

Gets the y-axis value of the bottom side of the rectangle.

◆ BottomLeft

XPoint PdfSharp.Drawing.XRect.BottomLeft
get

Gets the position of the bottom-left corner of the rectangle.

◆ BottomRight

XPoint PdfSharp.Drawing.XRect.BottomRight
get

Gets the position of the bottom-right corner of the rectangle.

◆ Center

XPoint PdfSharp.Drawing.XRect.Center
get

Gets the center of the rectangle.

◆ Empty

XRect PdfSharp.Drawing.XRect.Empty
staticget

Gets the empty rectangle.

◆ Height

double PdfSharp.Drawing.XRect.Height
getset

Gets or sets the height of the rectangle.

◆ IsEmpty

bool PdfSharp.Drawing.XRect.IsEmpty
get

Gets a value indicating whether this instance is empty.

◆ Left

double PdfSharp.Drawing.XRect.Left
get

Gets the x-axis value of the left side of the rectangle.

◆ Location

XPoint PdfSharp.Drawing.XRect.Location
getset

Gets or sets the location of the rectangle.

◆ Right

double PdfSharp.Drawing.XRect.Right
get

Gets the x-axis value of the right side of the rectangle.

◆ Size

XSize PdfSharp.Drawing.XRect.Size
getset

Gets or sets the size of the rectangle.

◆ Top

double PdfSharp.Drawing.XRect.Top
get

Gets the y-axis value of the top side of the rectangle.

◆ TopLeft

XPoint PdfSharp.Drawing.XRect.TopLeft
get

Gets the position of the top-left corner of the rectangle.

◆ TopRight

XPoint PdfSharp.Drawing.XRect.TopRight
get

Gets the position of the top-right corner of the rectangle.

◆ Width

double PdfSharp.Drawing.XRect.Width
getset

Gets or sets the width of the rectangle.

◆ X

double PdfSharp.Drawing.XRect.X
getset

Gets or sets the X value of the rectangle.

◆ Y

double PdfSharp.Drawing.XRect.Y
getset

Gets or sets the Y value of the rectangle.


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