Quick question: easy way to draw bitmap?
Quick question: easy way to draw bitmap?
- Subject: Quick question: easy way to draw bitmap?
- From: "Jeff Bland" <email@hidden>
- Date: Fri, 13 Jul 2007 15:33:52 +0900
Hey,
I've got a quick question. I'm new to Cocoa (and Mac OS in general) so
forgive me for asking a really basic question. I want to know the easiest
way to draw a bitmap in my application from memory. I have a array of bitmap
data like so:
u8 bitmp_data[ bitmap_width * bitmap_height * color_depth]
and I want to display it in a Cocoa Window.
Naturally I figured I needed an NSImageView. So I made one. But it takes an
NSImage, so I made one of those. But an NSImage takes one or more
NSImageReps, so I subclassed that and instantiated one. Then I created the
draw function for my NSImageRep subclass, and my testing shows that's being
called, but now I have to go learn the quickdraw 2d library to figure out
how to draw my bitmap... There's an easier way right?
Thanks for your help,
- Jeff Bland
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden