# Rectangle Structure

Stores a set of four integers that represent the location and size of a rectangle.

Namespace:  System.Drawing
Assembly:  Aspose.Drawing (in Aspose.Drawing.dll) Version: 20.8.0.0 (20.8.0) Syntax
C#
`public struct Rectangle`

The Rectangle type exposes the following members. Constructors
NameDescription Rectangle(Point, Size)
Initializes a new instance of the Rectangle struct with the specified location and size. Rectangle(Int32, Int32, Int32, Int32)
Initializes a new instance of the Rectangle structure with the specified location and size. Properties
NameDescription Bottom
Gets the y-coordinate that is the sum of the Y and Height property values of this Rectangle structure. Height
Gets or sets the height of this Rectangle structure. IsEmpty
Gets a value indicating whether all numeric properties of this [!:T;Rectangle] have values of zero. Left
Gets the x-coordinate of the left edge of this Rectangle structure. Location
Gets or sets the coordinates of the upper-left corner of this Rectangle structure. Right
Gets the x-coordinate that is the sum of X and Width property values of this Rectangle structure. Size
Gets or sets the size of this Rectangle. Top
Gets the y-coordinate of the top edge of this Rectangle structure. Width
Gets or sets the width of this Rectangle structure. X
Gets or sets the x-coordinate of the upper-left corner of this Rectangle structure. Y
Gets or sets the y-coordinate of the upper-left corner of this Rectangle structure. Methods
NameDescription Ceiling
Converts the specified RectangleF structure to a Rectangle structure by rounding the RectangleF values to the next higher integer values. Contains(Point)
Determines if the specified point is contained within this Rectangle structure. Contains(Int32, Int32)
Determines if the specified point is contained within this Rectangle structure. Equals
Tests whether obj is a Rectangle structure with the same location and size of this Rectangle structure.
(Overrides ValueTypeEquals(Object).) FromLTRB
Creates a Rectangle structure with the specified edge locations. GetHashCode
Returns the hash code for this Rectangle structure. For information about the use of hash codes, see GetHashCode .
(Overrides ValueTypeGetHashCode.) GetType (Inherited from Object.) Inflate
Enlarges this Rectangle by the specified amount. Intersect(Rectangle)
Replaces this Rectangle with the intersection of itself and the specified Rectangle. Intersect(Rectangle, Rectangle)
Returns a third Rectangle structure that represents the intersection of two other Rectangle structures. If there is no intersection, an empty Rectangle is returned. IntersectsWith
Determines if this rectangle intersects with rect. Offset
Adjusts the location of this rectangle by the specified amount. Round
Converts the specified RectangleF to a Rectangle by rounding the RectangleF values to the nearest integer values. ToString (Inherited from ValueType.) Truncate
Converts the specified RectangleF to a Rectangle by truncating the RectangleF values. Union
Gets a Rectangle structure that contains the union of two Rectangle structures. Operators
NameDescription Equality
Tests whether two Rectangle structures have equal location and size. Inequality
Tests whether two Rectangle structures differ in location or size. Fields
NameDescription Empty
Represents a Rectangle structure with its properties left uninitialized. See Also
{"ft_lang_label":"__label__en","ft_lang_prob":0.6121649,"math_prob":0.89698106,"size":3215,"snap":"2020-34-2020-40","text_gpt3_token_len":622,"char_repetition_ratio":0.27499223,"word_repetition_ratio":0.14222223,"special_character_ratio":0.18413685,"punctuation_ratio":0.09596929,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96783495,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-25T12:40:41Z\",\"WARC-Record-ID\":\"<urn:uuid:fc20ab90-6a2c-4634-8a10-b6d93672f749>\",\"Content-Length\":\"27786\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:34ee28ed-22b8-4b5e-acfa-15250f0618c3>\",\"WARC-Concurrent-To\":\"<urn:uuid:ae2403e9-0880-496f-a383-03a17653af5b>\",\"WARC-IP-Address\":\"54.213.46.7\",\"WARC-Target-URI\":\"https://apireference.aspose.com/drawing/net/system.drawing/rectangle\",\"WARC-Payload-Digest\":\"sha1:M22MQD7DO3RNBFVYT4M755Z7AGNA3KJJ\",\"WARC-Block-Digest\":\"sha1:XQWPRPRAGBX22YZN5QSERQAMZ5ZKQHHV\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600400226381.66_warc_CC-MAIN-20200925115553-20200925145553-00014.warc.gz\"}"}