Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
QuickDraw
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Principles of QuickDraw== QuickDraw was grounded in the [[Apple Lisa]]'s LisaGraf of the early 1980s and was designed to fit well with the [[Pascal programming language|Pascal]]-based interfaces and development environments of the early [[Apple Computer|Apple]] systems. In addition, QuickDraw was a [[raster graphics]] system, which defines the [[pixel]] as its basic unit of graphical information. This is in contrast to [[vector graphics]] systems, where graphics primitives are defined in mathematical terms and rasterized as required to the display resolution. A raster system requires much less processing power however, and was the prevailing paradigm at the time that QuickDraw was developed. QuickDraw defined a key data structure, the graphics ''port'', or GrafPort. This was a logical drawing area where graphics could be drawn. The most obvious on-screen "object" corresponding to a GrafPort was a [[window (computing)|window]], but the entire desktop view could be a GrafPort, and off-screen ports could also exist. The GrafPort defined a [[coordinate system]]. In QuickDraw, this had a resolution of 16 [[binary digit|bits]], giving 65,536 unique vertical and horizontal locations. These are numbered from -32,767 on the extreme left (or top), to +32,767 on the extreme right (or bottom). A window was usually set up so that the top, left corner of its content area was located at 0,0 in the associated GrafPort. A window's content area did not include the window's frame, [[drop shadow]] or title bar (if any). QuickDraw coordinates referred to the infinitely thin lines ''between'' [[pixel]] locations. An actual pixel was drawn in the space to the immediate right and below the coordinate. This made it easier for programmers to avoid graphical glitches caused by [[off-by-one error]]s. On the Macintosh, pixels were square, and a GrafPort had a default resolution of 72 pixels per inch, chosen to match conventions established by the printing industry of having 72 [[Point (typography)|points]] per inch. QuickDraw also contained a number of scaling and mapping functions. QuickDraw maintained a number of [[global variable]]s per process, chief among these being the current port. This originally simplified the API, since all operations pertained to "the current port," but as the OS developed, this use of global state has also made QuickDraw much harder to integrate with modern design approaches such as [[Thread (computing)|multi-threading]] and [[Preemption (computing)#Preemptive_multitasking|pre-emptive multitasking]]. To address these problems, the [[Carbon (API)|Carbon]] [[Application programming interface|API]] (a bridge between Mac OS 9 and Mac OS X) added additional parameters to some of the routines, allowing for the (opaque) storage of thread information and a new (non-polled) event structure.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)