Quartz 2D: Difference between revisions

Content deleted Content added
No edit summary
 
(63 intermediate revisions by 40 users not shown)
Line 1:
{{Mac OS X graphics model
{| border="0" cellpadding="0" align="center" cellspacing="0" style="background: #f9f9f9; border: 0px #aaa solid; border-collapse: collapse;"
|logo= [[File:Quartz2D.png|Quartz 2D|96px]]
|-
|}}
! colspan="2" | Quartz 2D
'''Quartz 2D''' is the primarynative two-dimensional graphics rendering [[API]] for [[MacmacOS]] OSand X[[iOS]] platforms, part of the [[Core Graphics]] framework.
|-
!
[[Image:Apple_Quartz.jpg]]
!
{| class="infobox" style="width: 22em;"
|- style="background:#AADDBB" align="center"
| style="border-bottom: 2px solid #ccffcc"" | '''Mac OS X Graphics Model'''
|- style="background:#ccffcc"
| Rendering
|-
| Quartz 2D • [[Core Image]] • [[Core Video]]
|- style="background:#ccffcc"
| Compositing
|-
|
[[Quartz Compositor]]
|-
|align="center"|
|}
|}
 
'''Quartz 2D''' is the primary two-dimensional graphics rendering [[API]] for [[Mac OS X]], part of the [[Core Graphics]] framework.
 
==Overview==
Quartz 2D is available to all MacmacOS OSand XiOS application environments, and provides resolution-independent and device-independent rendering of bitmap graphics, text, and vectors both on-screen and in preparation for printing. Its responsibilities within the graphics layer include:<ref>{{cite web | title=Apple - Developer - Quartz 2D Programming Guide | url=httphttps://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_introIntroduction/chapter_1_section_1Introduction.html#//apple_ref/doc/uid/TP40007533-SW1 | accessdateaccess-date=20072012-0103-2428}}</ref>
 
* Rendering text
Quartz 2D is available to all Mac OS X application environments, and provides resolution-independent and device-independent rendering of bitmap graphics, text, and vectors both on-screen and in preparation for printing. Its responsibilities within the graphics layer include:<ref>{{cite web | title=Apple - Developer - Quartz 2D Programming Guide | url=http://developer.apple.com/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_intro/chapter_1_section_1.html | accessdate=2007-01-24}}</ref>
 
* Rendering text using [[Apple Type Services for Unicode Imaging|Apple Type Services (ATS)]]
* Displaying, manipulating, and rendering [[PDF]] documents
* Converting [[PostScript]] data to PDF data, and vice- versa
* Displaying, manipulating, and rendering bitmap images via ImageIO
* Providing color management via [[ColorSync]]
* Displaying the elements of the [[Aqua (user interface)|Aqua]] user interface
!
Because Quartz 2D is one of several Quartz Technologies, the term "Quartz" by itself must be taken in context.
 
==Drawing in Quartz 2D==
 
Quartz 2D expands the drawing functions associated with [[QuickDraw]]. The most notable difference is that Quartz 2D eliminates output device and resolution specificity.
 
The drawing model utilized by Quartz 2D is based on PDF specification 1.4.<ref>{{cite web | title=Apple - Developer - Graphics & Imaging Overview | url=httphttps://developer.apple.com/graphicsimaging/overview.html | accessdateaccess-date=2007-01-25}}</ref> Drawing takes place using a [[Cartesian coordinate system]], where text, vectors, or bitmap images are placed on a grid.<ref>{{cite web | title=Apple - Developer - Quartz Programming Guide for QuickDraw Developers: Coordinate Space | url=httphttps://developer.apple.com/documentation/Carbon/Conceptual/QuickDrawToQuartz2D/tq_other/chapter_3_section_2.html | accessdateaccess-date=2007-01-25 |url-status=dead |archive-url=https://web.archive.org/web/20081011215343/http://developer.apple.com/documentation/Carbon/Conceptual/QuickDrawToQuartz2D/tq_other/chapter_3_section_2.html |archive-date=October 11, 2008 }}</ref> However, drawing output is not sent directly to the output device. Quartz 2D uses graphics contexts, environments in which drawing takes place. Each graphics context defines how the drawing should be presented: in a window, sent to a printer, an OpenGL layer, or offscreenoff-screen. Each context rasterizes the drawing at the desired resolution without altering the data that defines the drawing. Thus, contexts are the mechanism by which Quartz 2D employs resolution- and device-independence. For example, a window context may rasterize an object to the appropriate screen resolution to create actual graphics on the display. The same object can be sent to a printing context at a much higher resolution. This permits the same graphics commands to yield output on any device using the most appropriate resolution.<ref>{{cite web | title=Apple - Developer - Quartz Programming Guide for QuickDraw Developers: Drawing Destinations | url=httphttps://developer.apple.com/documentation/Carbon/Conceptual/QuickDrawToQuartz2D/tq_other/chapter_3_section_3.html | accessdateaccess-date=2007-01-25 |url-status=dead |archive-url=https://web.archive.org/web/20080905214109/http://developer.apple.com/documentation/Carbon/Conceptual/QuickDrawToQuartz2D/tq_other/chapter_3_section_3.html |archive-date=September 5, 2008 }}</ref>
 
==History==
Quartz 2D is similar to [[NeXT]]'s [[Display PostScript]] in its use of contexts. It first appeared as the 2D graphics rendering library called Core Graphics Rendering; along with Core Graphics Services (Compositing), it was wrapped into the initial incarnation of Quartz.<ref>{{cite web | title=Ars Technica - Mac OS X DP4 | url=httphttps://arstechnica.com/reviews/2q00/macos-x-dp4/macos-x-dp4-4.html | accessdateaccess-date=2007-01-25}}</ref> Quartz (and its renderer) were first demonstrated at WWDC in [[May]] [[1999]].<ref>{{cite web | title=Ars Technica - Mac OS X Update: Quartz & Aqua | url=httphttps://arstechnica.com/reviews/1q00/macos-x-gui/macos-x-gui-2.html | accessdateaccess-date=2007-01-25}}</ref>
 
Presently, the name ''Quartz 2D'' more precisely defines the 2D rendering capabilities of Core Graphics (Quartz). With the release of Mac OS X 10.2, marketing attention focused on [[Quartz Extreme]], the composition layer, leaving the term "Quartz" to refer to the whole Core Graphics suiteframework or just its 2D renderer. Presently, Such''Quartz'' ambiguitytechnologies iscan nodescribe longerall convenient becauseof the Core Graphics rendering layerand nowcompositing includestechnologies [[Coreintroduced Image]]by andmacOS [[Core Video]], with(including [[Core AnimationImage]] on itsfor wayexample).
 
Prior to Mac OS X 10.4Tiger, QuickDraw rendering outperformed that of Quartz 2D. Mac OS X 10.4 rectified this, substantially increasing the standard rendering performance of Quartz 2D.<ref name="Ars 10.4">[https://arstechnica.com/apple/2005/04/macosx-10-4/14/ Mac OS X 10.4 Tiger | Ars Technica]</ref> Tiger also introuducedintroduced Quartz 2D Extreme: optional graphics processor (GPU) accellerationacceleration for Quartz 2D, although it is not an officially supported feature.<ref name="Ars 10.4" /> Quartz 2D Extreme is presently disabled by default in Mac OS X 10.4 because it currentlymay offerslead onlyto smallvideo practicalredraw performanceissues or kernel improvementspanics.<ref>{{cite web | title=ArsApple Technica- Info - Docs - About the Mac OS X 10.4.3 Tiger:Update Page 14(Delta) | url=http://arstechnicadocs.info.apple.com/reviewsarticle.html?artnum=301984 | access-date=2007-08-19 | archive-url=https:/os/macosx-10web.4archive.arsorg/14web/20071016043656/http://docs.info.apple.com/article.html?artnum=301984 | accessdatearchive-date=2007-0110-2716 | url-status=dead }}</ref> In Mac OS X Leopard, Quartz 2D Extreme was renamed QuartzGL.
 
== See Alsoalso ==
* [[Quartz (graphics layer)]]
* [[Quartz Compositor]]
Line 55 ⟶ 34:
* [[Display PostScript]]
* [[Core Image]]
* [[Direct2D]]
 
== References ==
{{reflist}}
 
== External links ==
* [httphttps://www.apple.com/macosx/features/quartzwhat-is-macosx/graphics-media.html Mac OS X &ndash; Features &ndash; Quartz Extreme] &ndash; from Apple
* [httphttps://developer.apple.com/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/ Introduction to Quartz 2D Programming Guide] &ndash; developer documentation from Apple
* [http://www.macdevcenter.com/pub/a/mac/2004/09/28/quartz.html Introduction to Quartz 2D for QuickDraw Programmers] &ndash; developer documentation from O'Reilly's MacDevCenter
 
== References ==
 
<div class="references-small" style="-moz-column-count:2; column-count:2;">
<references/>
</div>
 
 
[[Category:Graphics libraries]]
[[Category:Mac OS XmacOS APIs]]
 
[[it:Quartz 2D]]
[[zh:Quartz 2D]]