Re: How to draw text to bitmap (array) with pre 10.5 libs

2009-12-01 Thread John Horigan
>> >> Indeed, the initWithBitmapDataPlanes method treats the supplied buffer as >> immutable and creates its own internal copy. > > This is not correct. From the docs [1]: > > "If planes is not NULL and the array contains at least one data pointer, the > returned object will only reference th

Re: How to draw text to bitmap (array) with pre 10.5 libs

2009-11-30 Thread Glenn McCord
Thanks for all the feedback guys. I got it to work using the NSString drawWithRect. For the sake of all those who stumble across this thread, the code used (minus lots of font and string code) is as follows... unsigned char* bitmapData = 0; NSBitmap

Re: How to draw text to bitmap (array) with pre 10.5 libs

2009-11-30 Thread Adam R. Maxwell
On Nov 29, 2009, at 10:01 PM, John Horigan wrote: > > On Nov 29, 2009, at 9:09 PM, Graham Cox wrote: > >> >> On 30/11/2009, at 2:44 PM, Glenn McCord wrote: >> >>> What I'm expecting is the drawAtPoint method to draw nsString inside >>> the bitmapRep of the NSContext at which point I can retri

Re: How to draw text to bitmap (array) with pre 10.5 libs

2009-11-29 Thread John Horigan
On Nov 29, 2009, at 9:09 PM, Graham Cox wrote: > > On 30/11/2009, at 2:44 PM, Glenn McCord wrote: > >> What I'm expecting is the drawAtPoint method to draw nsString inside >> the bitmapRep of the NSContext at which point I can retrieve the raw >> data and do something with it. On account of th

Re: How to draw text to bitmap (array) with pre 10.5 libs

2009-11-29 Thread Graham Cox
On 30/11/2009, at 2:44 PM, Glenn McCord wrote: > What I'm expecting is the drawAtPoint method to draw nsString inside > the bitmapRep of the NSContext at which point I can retrieve the raw > data and do something with it. On account of the data all being zero, > I'm obviously doing something wro