Re: Pixel Drawing Program
Re: Pixel Drawing Program
- Subject: Re: Pixel Drawing Program
- From: Shawn Erickson <email@hidden>
- Date: Fri, 14 Feb 2003 18:43:44 -0800
On Friday, February 14, 2003, at 05:16 PM, Sebastian Gomez Papiol
wrote:
I want to make a pixel drawing program like "Deluxe Paint". A program
to draw at pixel level pcx images of 256 colors. But I'm "amateur"
programmer and I don't know exactly how to begin.
My intention is, with the help of image filters, load a PCX image in a
custom view, and load the color palette of the image in 256 custom
views (one for every color). But I don't know how to edit the image in
a pixel level, and draw things like lines, ovals, etc... because
NSBezierPath class isn't enough precise to draw in a pixel basis (the
minium width of a bezier line is 2 pixels without antialias).
I don' think that is true... the coordinate system used in Quartz 2D
places the pixel at the center of number grid not at the corner. In
other words to draw a single point your coordinates must be 0.5 off
from each edge of the coordinate grid.
(0.5, 0.5) is a point centered in the coordinate grid defined by (0,0)
by (0,1) by (1,1) by (1,0) and should result in a single pixel being
drawn.
(1,1) is a point centered between four pixels and hence you would get
multiple pixels drawn (depending on anti-aliasing) in an attempt to
render what you asked.
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.