Re: [NTLK] DrawXBitmap

From: Simon Bell (simonbell_at_mac.com)
Date: Sat Jan 15 2005 - 02:23:21 PST


On 15 Jan, 2005, at 4:49 am, John Charlton wrote:

> Anyone ever had luck using the function? I've got:
>
> DrawXBitmap(
> { left:30, top:30, right:42, bottom:42 },
> 'bitmap, 0, modeCopy );
>
> for a 96x12 1-bit PICT resource (tried a greyscale too) loaded into
> 'bitmap, and all I get is a box of jumbled pixels.

bitmap should be the bitmap you retrieved from GetPictAsBits() and not
a symbol as shown in your code snippet (ie lose the ') but maybe that's
just a typo.

Also you need to be absolutely sure that your PICT (type 1 only
allowed) is of the appropriate dimensions for the bounds frame you
specified. The numbers you quote look OK, but if say the PICT was
actually 13 pixels high that would offset each row of the resulting
bitmap giving "a box of jumbled pixels."

Hope this helps

Simon

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Mon Jan 17 2005 - 07:30:00 PST