Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mistasparkaru

macrumors newbie
Original poster
Apr 19, 2010
20
0
Hello everybody, i am very new to iphone programming so I have probably got the wrong end of the stick.

I can draw simple graphcs by doing a:

CGContextRef context = UIGraphicsGetCurrentContext();

then i can do a:

CGContextMoveToPoint(context, 10, 10);
CGContextAddLineToPoint(context, 20,20);
CGContextDrawPath(context,kCGPathFillStroke);

etc to draw simple shapes but where is the setpixel? I want to create a mandlebrot viewer as a learning excersize but i cant get very far without setpixel.


also, is there a simple way of passing a color to CGContextSetFillColorWithColor? without casting a UIcolor and CGColorRef?
 
You can use CGContextFillRect with a rect size (width, height) of 1.0.

You can get a CGBitmapContext, and write directly into it's memory.
 
You can use CGContextFillRect with a rect size (width, height) of 1.0.

You can get a CGBitmapContext, and write directly into it's memory.

Do you have any CGBitmapConext examples?

why is doing a putpixel so complicated?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.