[]
        
(Showing Draft Content)

C1.Win.Bitmap.ImageRect

ImageRect Struct

Represents a rectangle for clipping images.

Implements
Namespace: C1.Win.Bitmap
Assembly: C1.Win.Bitmap.4.8.dll
Syntax
public struct ImageRect : IEquatable<ImageRect>

Constructors

Name Description
ImageRect(RectL)

Initializes a new instance of the ImageRect struct.

ImageRect(Rectangle)

Initializes a new instance of the ImageRect struct.

ImageRect(int, int)

Initializes a new instance of the ImageRect struct.

ImageRect(int, int, int, int)

Initializes a new instance of the ImageRect struct.

Fields

Name Description
Empty

An empty rectangle.

Height

The height of the rectangle.

Width

The width of the rectangle.

X

The horizontal coordinate of the rectangle.

Y

The vertical coordinate of the rectangle.

Properties

Name Description
Bottom

Gets or sets the y-coordinate of the bottom edge.

HasSpace

Determines if there is some space within the rectangle.

Left

Gets or sets the x-coordinate of the left edge.

Right

Gets or sets the x-coordinate of the right edge.

Top

Gets or sets the y-coordinate of the top edge.

Methods

Name Description
Contains(ImageRect)

Determines if the specified rectangle is fully contained within this rectangle.

Contains(int, int)

Determines if the specified point is contained within this rectangle.

Equals(ImageRect)

Indicates whether this instance and a specified object are equal.

Equals(object)

Indicates whether this instance and a specified object are equal.

FromLTRB(int, int, int, int)

Creates a ImageRect struct from (left, top, right, bottom) coordinates.

GetHashCode()

Returns a hash code for this instance.

Inflate(int, int)

Inflates the rectangle by the specified amount.

Intersect(ImageRect, ImageRect)

Returns a rectangle that represents the intersection of two rectangles.

IntersectsWith(ImageRect)

Determines if this rectangle intersects with rect.

Offset(int, int)

Offsets the rectangle by the specified amount.

ToRectL()

Converts ImageRect to RectL.

ToRectangle()

Converts ImageRect to Rectangle.

ToString()

Returns a string that represents the current object.

Union(ImageRect, ImageRect)

Creates the smallest possible third rectangle that can contain both of two rectangles that form a union.

Operators

Name Description
operator ==(ImageRect, ImageRect)

Determines if the specified values are equal.

explicit operator ImageRect(RectL)

Performs an explicit conversion from RectL to ImageRect.

explicit operator RectL(ImageRect)

Performs an explicit conversion from ImageRect to RectL.

explicit operator Rectangle(ImageRect)

Performs an explicit conversion from ImageRect to Rectangle.

explicit operator ImageRect(Rectangle)

Performs an explicit conversion from Rectangle to ImageRect.

operator !=(ImageRect, ImageRect)

Determines if the specified values are not equal.