[comp.sys.mac.programmer] Bitmap not showing up in scrapbook

legg@sirius.ucs.adelaide.edu.au (Christian Legg) (01/03/90)

  A friend of mine is having problems with displaying a bitmap that he has
saved in the scrapbook. He uses copybits to copy the bitmap into a PICT
resource which he then saves into the scrapbook. The scrapbook indicates
in the lower right hand corner that the item is a PICT, but does not display
it, much like the occasional 'this item has no picture or text' message but
without the message! The PICT has definitely been saved in the scrapbook as
it is possible to read it back in later. Has anyone else had this problem,
and if so, what can be done about it? Is he forgetting to set any display
parameters (if there are such things)?

  thanks

      Christian Legg

******************************************************************************
* Christian Legg,                           *   'The man who can smile when  *
* University Computing Services,            *   things go wrong has found    *
* University of Adelaide, South Australia.  *   someone to blame it on'      *
******************************************************************************

trebor@biar.UUCP (Robert J Woodhead) (01/03/90)

legg@sirius.ucs.adelaide.edu.au (Christian Legg) writes:


>  A friend of mine is having problems with displaying a bitmap that he has
>saved in the scrapbook. He uses copybits to copy the bitmap into a PICT
>resource which he then saves into the scrapbook. The scrapbook indicates
>in the lower right hand corner that the item is a PICT, but does not display
>it.

Thou hast been bitten by that most egregious of monsters, the Immense
ClipRect.  When you create the grafport that you draw into to generate
the picture, always set it's cliprect to just surround the area that will
be drawn.  Otherwise you get a huge cliprect (-32768,-32768,32767,32767)
and the scrapbook and other programs go a little bonkers because of it.

-- 
Robert J Woodhead, Biar Games, Inc.   !uunet!biar!trebor | trebor@biar.UUCP
Announcing TEMPORAL EXPRESS.  For only $999,999.95 (per page), your message
will be carefully stored, then sent back in time as soon as technologically
possible.  TEMEX - when it absolutely, postively has to be there yesterday!