|
|||||
As well as specifying Points on your Bitmap you often need to specify areas. One of the most common constructs is a Rectangle. You can use a rectangle to specify an area of the Bitmap. For instance:
A rectangle is described by a Location and a Size - the top left corner of the rectangle and the width and height. However there are other ways of looking at this and sometimes you will find rectangles specified using the left, top, right and bottom coordinates . If the top left of the rectangle is the same as the bottom right - the width and height are zero - this is referred to as an Empty rectangle.
ImageGlue has a Rectangle and a RectangleF structure. The former is used for integral coordinates and the latter for floating point ones. You can cast between these two types and indeed perform arithmetic operations on them. ImageGlue has a Size and a SizeF structure which are used to represent dimensions - width and height. Like the rectangle structures you can cast between these two types and perform arithmetic operations on them. Rectangles are defined by a top left location which is a Point and a dimension which is a Size. |