13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ectangle extend from these two points and are parallel to the x­and y-axes. The following list briefly describes each rectanglefunction:FunctionCopyRectEqualRectInflateRectI ntersectRectOffsetRectPtinRectSetRectEmptyUnionRectDescriptionMakes a copy of an existing rectangle.Determines whether two rectangles areequal.Expands or shrinks the specified rectangle.Finds the intersection of two rectangles.Moves a given rectangle.Indicates whether a specified point lieswithin a given rectangle.Sets a rectangle to an empty rectangle.Stores the union of two rectangles.Using rectanglesin a WindowsapplicationRectanglecoordinatesRectangles are used to specify rectangular areas on the display orin a window, such as the cursor clipping area, the client repaintarea, a formatting area for formatted text, and the scroll area.Rectangles are also used to fill, frame, or invert an area in theclient area with a given brush, and to retrieve the coordinates of awindow or a window's client area.Since rectangles are used for many different purposes, therectangle functions do not use an explicit unit of measure. Instead,all rectangle coordinates and dimensions are given in signed,logical values. The actual units are determined by the function inwhich the rectangle is used.Coordinate values for a rectangle can be within the range -32,768to 32,767. Widths and heights, which must be positive, are withinthe range 0 to 32,767. This means that a rectangle whose left andright sides or whose top and bottom are further apart than 32,768units is not valid. Figure 1.3 shows a rectangle whose upper-leftcorner is left of the origin, but whose width is less than 32,767:Chapter 1, Window manager interface functions 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!