Microsoft KB Archive/43697

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


Lower-Right Pixels of Rectangle Not Included in FRAMERECT

Article ID: 43697

Article Last Modified on 1/9/2003



APPLIES TO

  • Microsoft QuickBasic Compiler for Macintosh 1.0



This article was previously published under Q43697

SUMMARY

The video mapping of the Macintosh, as used by Toolbox calls such as FRAMERECT(), is based upon infinitely small points instead of finite pixels. Because of this mapping scheme, when a rectangle is defined for a Toolbox call, the lower-right pixel boundary is one less than the point boundary. These calls are described on Pages 401 to 404 of the "Microsoft QuickBASIC for Apple Macintosh: Language Reference" manual.

MORE INFORMATION

For further information on Macintosh video mapping, refer to the QuickDraw section of "Inside Macintosh Volume I."

Code Example

REM For example, the corners of the following rectangle are actually
REM   (100,100) and (199,199):

rect%(0)=100           ' Y1
rect%(1)=100           ' X1
rect%(2)=200           ' Y2
rect%(3)=200           ' X2
CALL FRAMERECT(VARPTR(rect%(0)))

This information applies to the following Toolbox routines:

   FRAMERECT, PAINTRECT, ERASERECT, INVERTRECT, FILLRECT

   FRAMEROUNDRECT, PAINTROUNDRECT, ERASEROUNDRECT, INVERTROUNDRECT,
   FILLROUNDRECT

   FRAMEOVAL, PAINTOVAL, ERASEOVAL, INVERTOVAL, FILLOVAL

   FRAMEARC, PAINTARC, ERASEARC, INVERTARC, FILLARC
                


Additional query words: MQuickB

Keywords: KB43697