Talk:QuickDraw

From Wikipedia, the free encyclopedia

    Skip to table of contents    

This is the talk page for discussing improvements to the QuickDraw article.

Article policies
This article is part of WikiProject Macintosh. This means that the WikiProject has identified it as an article pertaining to the Macintosh, but is not currently working to improve it. WikiProject Macintosh itself is an attempt to improve, grow, standardize, and attain featured status for Wikipedia's articles related to Macintosh and Apple Inc. We need all your help, so join in today!
C This article has been rated as C-Class on the assessment scale.
Low This article is on a subject of low-importance within Macs for inclusion in Wikipedia 1.0.

Contents

[edit] Coordinates

QuickDraw coordinates refer to the infinitely thin lines between pixel locations. An actual pixel is drawn in the space to the immediate right and below the coordinate. This eliminates the so-called "endpoint paranoia" and associated off-by-one errors.

Um, how is this different from a normal coordinate system? It sounds like semantics to me; I don't see how one would program it any differently from a normal coordinate system where the upper-left is (0, 0). - furrykef (Talk at me) 02:35, 29 October 2005 (UTC)

Nevertheless, this is how Apple defines it. According to Inside Macintosh Volume 1, page 1-138 (this is the original 1985 IM, not the later revised edition):
  • All grid lines are infinitely thin
These concepts are important. [] they mean that all elements represented on the coordinate plane are mathematically pure. Mathematical calculations using integer arithmetic will produce intuitively correct results. If you keep in mind that grid lines are infinitely thin, you'll never have "endpoint paranoia" - the confusion that results from not knowing whether that last dot is included in the line.
In other words, it's not the top, left that matters, it's the bottom right. If coordinates referred to the pixels themselves, a rectangle 0,0 - 100,100 could be either 100 or 101 pixels wide depending on your interpretation. This way, it can only be 100 pixels wide without a doubt. In addition, the pen width or line thickness is separated from the coordinate system. Graham 23:45, 29 October 2005 (UTC)

[edit] Capitalization

A while ago I fixed the capitalization to Quickdraw, which is what Apple actually used in their docs. Somebody seems to have had some fun reverting that to the wrong spelling again. Why???

Umm ... nevermind. Looks like my copy of "New Inside Macintosh" actually spells it QuickDraw. Guess that changed over time.

[edit] Regions

Regarding the recent stuff added about the internal mechanism in regions - is it too detailed? Actually I found it quite interesting, and haven't changed it much, but in many respects it's kinda not all that relevant to QuickDraw HOW these regions work, and besides, as they are not documented publicly by Apple, is it really our job to do so? Who is the information going to help? Graham 06:11, 14 January 2006 (UTC)

[edit] Internal Region structure

The part which says

"Regions are implemented using both vertical and horizontal compression. A region is described as a series of horizontal lines ("rasters"), with the interior and exterior portions of the region within a line described by their run length (the number of pixels in the run). Identical adjacent runs are efficiently encoded by a line repeat count"

is in contraddiction with how the region internals are described at a site [1] I found.

Not being an expert of the matter, I wouldn't know for sure who's correct and who's not, however at that site you can find working code which deals with the representation described there, which I assume works as expected, and this would mean that effectively the description that wikipedia sports now is incorrect

The description on the MacTech site linked above is correct. The flaws in the current text are as follows:

  • There are no run-lengths encoded in a Region; it uses horizontal coordinates. (There was no advantage to using the run-length horizontally, because QuickDraw in general, and Regions as part of it, only ever worked with 16-bit coordinates. On a 680x0 processor you got much more benefit from keeping everything 2-byte aligned than you did by saving a byte or two here and there.)
  • The identical adjacent runs are encoded by vertical coordinates, not a repeat count.

I've done some reverse-engineering of the Region format myself, and then later worked directly with it when I was working on 2D hardware graphics acceleration at Apple. --Drewthaler 07:44, 14 September 2007 (UTC)

[edit] Authorship

My understanding is that Bill wrote most if not all of QuickDraw (and was very proprietorial over it). Is there therefore fair to credit Andy first? I'm not saying Andy didn't contribute, but I'm sure Andy would be the first person to say that QuickDraw was Bill's baby. 80.93.170.99 12:30, 7 March 2007 (UTC)

Makes sense to me. --Steven Fisher 15:38, 8 March 2007 (UTC)