lotus



previous page: 5.3) What is the fastest way to set one pixel? (Imaging with QuickDraw - Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 5.5) Where can I find the format of picture files and resources? (Imaging with QuickDraw - Mac Programming)

5.4) Why do pictures I record suddenly draw as empty space or not draw at all? (Imaging with QuickDraw - Mac Programming)




Description

This article is from the Mac Programming FAQ, by Jon Watte h+@austin.metrowerks.com with numerous contributions by others.

5.4) Why do pictures I record suddenly draw as empty space or not draw at all? (Imaging with QuickDraw - Mac Programming)

When recording pictures, you have to set the clipping area to exactly
the frame of the picture you are recording. This is because it is
initally set at -32768,32727 in both directions, and offsetting the
picture even one pixel when drawing it will result in the region
wrapping around and becoming empty.

When recording pictures, do this:

*code*
PicHandle h = OpenPicture ( & theRect ) ;
ClipRect ( & theRect ) ;
    /* draw the picture */
ClosePicture ( ) ;
*end*

 

Continue to:















TOP
previous page: 5.3) What is the fastest way to set one pixel? (Imaging with QuickDraw - Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 5.5) Where can I find the format of picture files and resources? (Imaging with QuickDraw - Mac Programming)