QuickDraw GX

QuickDraw GX was a replacement for the QuickDraw graphics engine and Printing Manager, initially released in about January 1995. Version 1.1.1 was bundled with Macintosh System 7.5 later that year. Besides including a complete replacement for the traditional Macintosh printing architecture, it also introduced a rehousing of Type 1 fonts moving the PostScript outlines into the TrueType font file format. While the intentions behind these reorganizations were good--to make applications faster to make for the developer and more interoperable to use with system level text management and color management--there were too many existing applications that had developed their own architectures. Thus, the installation of GX introduced a host of incompatibilities that only succeeded in annoying users. This, coupled with opposition from the developer market and a lack of communication from Apple about the benefits of QuickDraw GX and why users should adopt it, led to the technology being sidelined. Mac OS 8 dropped support for the GX printing architecture, though the text management and color management architectures survived. Out of the text management architecture came the TrueType Specification and out of the color management architecture came the ICC International Color Consortium specification. With the advent of OS X, GX lives on in ATSUI Apple Type Services for Unicode Imaging, in ColorSync whose file format is identical to the file format of the ICC International Color Consortium, and in transparency which is visible in the user interface.

Contents

Graphics

Unlike QuickDraw, QuickDraw GX allowed for fractional coordinates. However, these were fixed-point values, rather than floating-point. This might have been because at the time GX was being developed (late 1980s to early 1990s), there was still a significant performance penalty in using floating-point arithmetic.

In addition to coordinates was the concept of the gxMapping. This was a 3-by-3 matrix which could express arbitrary linear transformations in two dimensions, including perspective distortions.

In the world of PostScript, features not available in the PostScript graphics model could be programmed by the developer. The programmability of PostScript led to unreliable printing performance, and was abandoned by Adobe in the PDF Portable Document Format language. The GX graphics architecture was built around a number of types of objects which were premade, though a full set of API calls was available for examining and manipulating them:

  • a gxShape defined the basic geometry of a shape (for example, coordinates of control points for a curve, or the text content of a text object).
  • a gxStyle defined elaborations of the basic shape geometry, such as line thickness, cap and join styles, fill pattern and text font.
  • a gxInk specified how pixel values were to be computed when rendering the shape: besides specifying a basic colour for the shape, this also included an elaborate transfer mode structure that could define a wide variety of functions of the initial and final destination pixel value.
  • a gxFont represented a font, either one installed for systemwide use, or one installed on-the-fly by the current application for its own use. API calls allowed the interrogation of the properties of a font, including the determination of what encodings (Unicode, language-specific etc) it might support.
  • a gxProfile was a representation of a ColorSync colour profile, used as part of the specification of a colour for drawing. GX integrated full support for colour matching at all stages of the drawing process, as well as support for non-RGB colour specifications (such as HSV, YUV and CIE XYZ).
  • a gxTransform determined the relationship between the shape and the display device. Besides the clipping path and the gxMapping that transformed the shape before displaying on the output device, this object also specified hit-testing information that controlled responses to user clicks within the area of the shape.
  • a gxViewDevice represented a block of pixel memory into which drawing would be rendered. This could be an actual on-screen display, or an offscreen block of memory. GX supported all the QuickDraw pixel layouts; this allowed both a GX view device and a QuickDraw GrafPort to point to the same pixels, thereby allowing applications to mix both sets of drawing calls.
  • a gxViewPort was a logical destination for drawing. A gxTransform could specify a list of more than one of these; the shape would be drawn into all of them in a single GXDrawShape call.
  • a gxViewGroup represented the connection between view devices and view ports. Each view port had a gxMapping specifying its relationship to the global coordinate system of the view group; and each view device had a gxMapping that specified its location and the size of its pixels with regard to view group coordinates. THere was a single prdefined view group which contained all on-screen view devices (and whose view ports effectively corresponded to on-screen windows); applications were free to create their own view groups for off-screen view devices and view ports.
  • a gxTag allowed the attachment of arbitrary application-defined information to most of the above object types. Each tag had an OSType type code, but there could be multiple tags of the same type attached to the same object.

Shape types

GX shapes could be of various types:

  • a straight line defined by its end points.
  • a rectangle defined by its left, right, upper and lower bounds.
  • a polygon defined by a sequence of vertex coordinates.
  • a curve shape was a single quadratic Bézier curve defined by three control points.
  • a path shape which was a sequence of quadratic Bézier curves. Each control point had an associated flag indicating whether it was "on-curve" or "off-curve". An on-curve point was a Bézier endpoint, while an off-curve point was a Bézier midpoint. If two successive off-curve points were encountered, then an implicit on-curve point was assumed to lie halfway between them. Two successive on-curve points defined a straight-line segment.
  • a bitmap shape contained raster data in any of the supported pixel formats.
  • a picture shape was a grouping of other shapes (possibly including recursive picture shapes), with the option of specifying additional transformations applying to the whole group.
  • the various types of typographic shapes are described in the GX Typography section below.
  • additional types which were perhaps not directly useful for drawing, but could be combined with other shapes in geometry calculations: the empty shape (drawing of which did nothing); the point shape consisting of a single point; and the full shape (of infinite extent).

Typography

The typography features of GX were integrated in the form of 3 types of gxShape:

  • Text shapes were the simplest: these contained a single run of text rendered in a single font style.
  • Glyph shapes were a way to use character shapes ("glyphs") as pure geometry, for instance as clipping paths.
  • Layout shapes were the most elaborate. These could be divided into multiple runs with different font styles, even different language encodings and text directions. Thus, it was possible to embed a sequence of Arabic text, rendered right-to-left, within an outer sequence of left-to-right Roman text. Layout shapes unleashed the full power of contextual substitutions, kerning, variations and all the other capabilities of TrueType GX fonts. Their main restriction was that they were confined to a single line of text.

The GX API also provided hit-testing functions, so that for example if the user clicked on a layout shape in the middle of a ligature, or in the region between a change of text direction, GX itself would provide the smarts to determine which character position in the original text corresponded to the click.

TrueType GX

An important distinction in GX was drawn between a character and a glyph, a distinction also found in the Unicode Standard. A character was an abstract symbol from the character set of a writing system, such as the letter "f" in the writing systems of the Latin script. Whereas a glyph was a specific graphic shape from a particular font, whether the shape represented a single character or a set of characters. Thus, for example, the Hoefler Text font had glyphs to represent the letters "f" and "l". It also had another glyph to represent the ligature "fl", which could be automatically composed (instead of the individual glyphs) wherever the two abstract characters "f" and "l" occurred in sequence in the source text.

This distinction was important in that such contextual substitutions occurred at rendering time, without any changes to the source character string. Thus they had no impact on editing or searching of the text. PostScript Type 1 font files have one to one mapping only, and as ligatures are many to one mappings, they can not be inserted into the composition without changing the source character string, for instance, the ligature ffi is placed at the position of capital Y in Adobe font products, and "Adobe Offices" is composed by typing "Adobe O" <change font> "Y" <change font> "ces". In the layout the character string is broken, and in PDF made from streamed PostScript the characters f+f+i can only be reconstructed, if the name of the glyph follows a glyph naming list.

Contextual substitutions cam be controlled by enabling or disabling the composition options of a TrueType GX font in WorldText on the Mac OS 9 CD or in TextEdit in Mac OS X. Fonts commonly have features called "common ligatures" (such as the "fl" example), "rare ligatures" (such as inscriptional ME and MD ligatures", "archaic non-terminal s" (for automatically substituting the letter "s" with the archaic form that looked more like an "f", except at the ends of words), and even choices between entirely separate sets of glyph designs, such as more and less ornate forms.

The rules for performing contextual substitutions are implemented as state machines built into the font, and interpreted by the LLM Line Layout Manager, the counterpart of the CMM Color Management Module for ColorSync services. Text management in the operating system allowed QuickDraw GX to accept character strings with any mix of writing systems and scripts, and compose the strings automatically, whether the encoding was Unicode 1.0 or 8 bit and 8/16 bit encodings.

Another interesting feature was font variations, which were the GX equivalent of Adobe's "multiple master" fonts. Only, Adobe's idea was that you had to explicitly create an instance of the font (by specifying values for the variation axes) before you could use it. Whereas GX allowed you to specify the font directly for a layout style, and then dynamically vary the axis values and immediately observe the effect on the layout of the text.

Printing

it:QuickDraw GX
Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools