Mac Plotting in cocoa

MrFusion

macrumors 6502a
Original poster
Jun 8, 2005
599
0
West-Europe
Hey,

Thinking long term, what would I need to learn in order to be able to plot 2D graphs with obj-c/cocoa.
I would handle 3D graphs as 2D with a color sidebar indicated the third axis.
Performance would be an issue.

opengl?
coreimage?
something else?

Thanks
 

robbieduncan

Moderator emeritus
Jul 24, 2002
24,638
61
Harrogate
Depending on your exact requirements I'd just use a custom view (or a custom cell if you want to add it to tables etc) and draw into that with standard Quartz.
 

MrFusion

macrumors 6502a
Original poster
Jun 8, 2005
599
0
West-Europe
robbieduncan said:
Depending on your exact requirements I'd just use a custom view (or a custom cell if you want to add it to tables etc) and draw into that with standard Quartz.
Ok, thanks. I am reading up about quartz. It's device independent, which is great. It can write to bitmap, screen,pdf,opengl. Also nice, but is there also an easy output to png or jpg, without having to implement these formats?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
24,638
61
Harrogate
MrFusion said:
Ok, thanks. I am reading up about quartz. It's device independent, which is great. It can write to bitmap, screen,pdf,opengl. Also nice, but is there also an easy output to png or jpg, without having to implement these formats?
Fairly. Render your view into an NSImage (lock focus on the view) containing an NSBitmapImageRep (only) and then use that to get the format you want (easy)...