• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Pixel Drawing Program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Pixel Drawing Program (From: Sebastian Gomez Papiol <email@hidden>)

  • Prev by Date: MyDocument and AppController
  • Next by Date: Pixel Drawing Program 2
  • Previous by thread: Pixel Drawing Program
  • Next by thread: MyDocument and AppController
  • Index(es):
    • Date
    • Thread