Drawing single pixel in Quartz

Posted by wwrob on Stack Overflow See other posts from Stack Overflow or by wwrob
Published on 2010-05-07T10:55:47Z Indexed on 2010/05/07 10:58 UTC
Read the original article Hit count: 255

Filed under:
|

I have an array of CGPoints, and I'd like to fill the whole screen with colours, the colour of each pixel depending on the total distance to each of the points in the array. The natural way to do this is to, for each pixel, compute the total distance, and turn that into a colour. Questions follow:

1) How can I colour a single pixel in Quartz? I've been thinking of making 1 by 1 rectangles.

2) Are there better, more efficient ways to achieve this effect?

© Stack Overflow or respective owner

Related posts about quartz

Related posts about iphone