home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20229 < prev    next >
Encoding:
Text File  |  1992-12-23  |  12.3 KB  |  264 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!think.com!spool.mu.edu!agate!iat.holonet.net!bwilliam
  3. From: bwilliam@iat.holonet.net (Bill Williams)
  4. Subject: Re: Curves in QuickDraw GX
  5. Message-ID: <Bzp7x4.90D@iat.holonet.net>
  6. Organization: HoloNet National Internet Access BBS: 510-704-1058/modem
  7.  
  8.  
  9. References: <PERM.92Dec18142818@groucho.csd.uu.se>
  10. Date: Wed, 23 Dec 1992 06:12:38 GMT
  11. Lines: 251
  12.  
  13. From the center of my handwritten notes regarding Quickdraw GX as presented
  14. at Apples May 92 WWDC....
  15.  
  16. "The spline routines are used with inset and an outset values to create 
  17. "fat" splines, the two outer edges are different splines (derivitive 
  18. curves) that approach cubic order complexity, but are not, and can be
  19.  converted back to the original very quickly (Rob Johnson, a math prof
  20.  from UCLA invented fast transformation algorithms for all QD GX spline
  21.  calculations, and is now an apple QD GX contributor)"
  22.  
  23.  
  24. For those interested heres a bunch of my other observations as recorded that
  25. week intact and without changes......
  26.  
  27.  
  28.  
  29. Beyond QuickDraw : the next generation in imaging
  30. Given by Cary Clark - graphics team leader and author of color fonts, and
  31. old 3D quickdraw.
  32.  
  33. The introduction of several discussions of Apples COMPLETE REPLACEMENT of
  34. QuickDraw with a near clone of Adobe DisplayPostscript called QuickDraw
  35. GX. Its code name was Skia ("Skee-ah"). It is a geometry (object) based
  36. graphics model.
  37.  
  38. It is nearly finished and will be available three different ways (end user
  39. $$, distributable license, and eventually free inclusion in a future
  40. system release).
  41.  
  42. Wow, wow, wow. It is definitely NOT as fast as display postscript, but in
  43. many ways it seemed faster. Work started in 1988 before DisplayPostscript
  44. was shown publicly. It is of course completely device independent, and its
  45. output files when printing, even after customization for a specific device
  46. at spool initiation ARE DEVICE INDEPENDENT AT ALL TIMES. Final printed
  47. output devices may be raster devices, vector devices (plotter) or
  48. Postscript devices.
  49.  
  50. No words or tokens are used in the imaging model, there is no server
  51. level, instead it appears as good-old-fashioned quickdraw to a normal
  52. programmer except that all geometries are based on 32 bit values and
  53. sometimes 64 bit values. (A fixed point is assumed when some values are used)
  54.  
  55. Unlike DisplayPostscript floating point values and computations are NOT
  56. used. This is a negative trait. 
  57.  
  58. Also unlike postscript, YOU MAY NOT SEND CODE OF ANYKIND TO THE OUTPUT
  59. SPOOLED IMAGE. Thus the author of "Jag" was told that his anti-aliasing
  60. product has no value because the effects of his product EXCEPT AS DEVICE
  61. DEPENDENT BITMAPS cannot be sent through the spooler and therefore should
  62. not be integrated into QD GX. The reason: THE GOAL OF QD GX IS TO MATCH
  63. THE SCREEN TO THE PRINTED OUTPUT. No code encapsulation is permitted. This
  64. is a good intention, but not providing spoolable code (as with PostScript)
  65. is a negative trait. 
  66.  
  67. Like DisplayPostscript, QD GX is a single pixel color model, and
  68. anti-aliasing and ramping is not supported. This is not to be confused
  69. with the pleasing types of blending fills that it does support.
  70.  
  71.  
  72. You may mix Quickdraw commands interspersed with QuickDraw GX without too
  73. much effort. Unfortunately, if you do, you must be careful to use a CASE
  74. SENSITIVE LANGUAGE such as Modula-2, C, C++ because there is a RPointS and
  75. a RpointS as well as QuickDraws RRectS and the new QuickDraw GXUs RrectS.
  76. Though on one slide I saw the word RrectangleS instead of rect, so I
  77. assume in Pascal they have a RgxPointS and a RrectangleS redefinition.
  78.  
  79. It does everything that display postscript does and a few extra things
  80. (such as placing pictures at joins of two lines).
  81.  
  82. It has the AMAZING benefit of using the highly optimizable quadratic
  83. spline for all curve and path operations. Though it cannot draw a circle.
  84. (I am not joking, strictly speaking, MANY of QuickDraw GX primitives are
  85. actually "libraries" outside of the lower lever QuickDraw GX.) I think
  86. drawcircle is a library routine. The spline routines are used with inset
  87. and an outset values to create "fat" splines, the two outer edges are
  88. different splines (derivitive curves) that approach cubic order
  89. complexity, but are not, and can be converted back to the original very
  90. quickly (Rob Johnson, a math prof from UCLA invented fast transformation
  91. algorithms for all QD GX spline calculations, and is now an apple QD GX
  92. contributor)
  93.  
  94. I got the feeling that "shapes", not paths or spline derived curves, were
  95. used for all of the very fast animated demos presented  (50 demos). I
  96. believe that "shapes" do NOT possess splines but rather are decomposed
  97. curves defined solely of small straight line segments. This is for speed
  98. speed speed. The programmer gets to define the segmentation parameters used.
  99.  
  100. Shapes are defined by fixed point, to prevent degradation after any series
  101. of permanent transformations.
  102.  
  103. The system supports a three-D transformation matrix with many library
  104. routines to help set the matrix parameters. Two values in the Matrix are
  105. unconventionally used for storage of variables meant for perspective
  106. distortion. (QD GX has no three dimensional routines, and the
  107. unconventional usage does not affect the non-existent "z" data)
  108. It has tons of layered transformation matrices at many layers before the
  109. final image is drawn and seems at most times to be a full blown 3D imaging
  110. model... but it isn't.
  111.  
  112. The matrix routines support fast skew, distort, and rotation (including
  113. bitmaps)
  114.  
  115. Patterns are now two parts, pattern data and "color shade" are separate
  116. identities.
  117.  
  118. There are still no pixel locations in QuickDraw, points have always been
  119. an abstraction and still are.... but programmers must be cautious to shift
  120. all position info to convert all points into fixed point math to avoid
  121. unwanted locations.
  122.  
  123. The new more accurate pixel locations allow much more exact vector line
  124. rotation even on 72 point monitors. The effect needs to be dynamic to
  125. discern the enhancement though.
  126.  
  127. It supports compressed "infinite-precision" BitMap regions, very nice
  128. results were obtained in the demos.
  129.  
  130. TrueType and Adobe type 1 fonts (under ATM) are EXACTLY EQUAL in usage in
  131. QD GX, neither has any preferential treatment in ANY WAY.
  132.  
  133. Font families have meaning now in the menu interface (like Adobe's Type
  134. Reunion already does)
  135.  
  136. The new font support is almost as complete as postscripts with some
  137. amazing differences. Primarily the ability to use different fancy fonts
  138. based on the characters adjacent to the font. Some astoundingly beautiful
  139. effects were shown with a slightly altered Zapf Chancery. Letters on the
  140. ends of words had bold sweeping flourishes, and capital letters at the
  141. beginning of words had long sweeping tails under the adjacent characters.
  142. WOW. Apple said they are commissioning a company to create a special "Old
  143. English" font for them.
  144.  
  145. A new Adobe Illustrator (version NIA 3.2) was shown that swapped back and
  146. forth between QD and QD GX. It had a GODDAMN STUPID PREVIEW MODE as it
  147. always has on systems that do not have built in display postscript,
  148. because of the nature of the program. The absolute horrifying restriction
  149. was only observed by me and other people that may have seen the
  150. "No-preview-mode-crap" NeXT version of Adobe Illustrator. Man, what an
  151. application not to show as a demo!
  152.  
  153. QD GX is a large set of different new technologies, especially for
  154. printing. A kinder gentler series of major changes in printer interfaces
  155. would make most people very happy. It is MUCH less cluttered, and far more
  156. restricted without probing. A control panel much like system 6's "general"
  157. is used to access third party extensions. In fact it is so simple a new
  158. menu item is defined by apple called "Print One Copy". Note the lack of
  159. "ellipses" (...). That's right it does what it says no questions asked.
  160. The audience clapped.
  161.  
  162. A printer "Finder" was created to manage spooling. It has as many features
  163. as the real finder in several ways. Plus it appears to be part of the
  164. Finder. WOW.
  165.  
  166. Plotters are supported.
  167.  
  168. Hit detection for mouse clicks as well as animated object collision is a
  169. major part of QD GX. Including accurate hit detection after all those
  170. layers of skewing, distorting, rotating, etcetera.... WOW. This is even
  171. better than the NeXT (one of the NeXT's few limitations from what I recall
  172. is a "lighter" hit detection system.
  173.  
  174. Multiple color spaces are supported (even within one image!!!!!!!!!)
  175.  
  176. It supports all the cool stuff color Postscript (2) does for dithering,
  177. screen rotation (arbitrary angles), etc. 
  178.  
  179. It supports viewports in a VERY ABSTRACT MANNER. a port can be a three-d
  180. is view any where in a space and can be displayed in a arbitrary shaped
  181. region anywhere on a device including MULTIPLE VIEWS OR THE SAME SCENE AT
  182. THE SAME TIME. The multiple views can all have different color depths and
  183. pixel resolutions, and dithering, and screening, and be somewhere on the
  184. same device!
  185.  
  186. Unlike postscript it supports RTL LTR and vertical languages, unlike
  187. Postscript it can be used to support indic and arabic languages where the
  188. characters change dramatically based on there position and neighboring
  189. glyphs. Arabic, Chinese and others where shown.
  190.  
  191. Like Postscript, the fonts can be filled, set on paths, stretched, etc.
  192. etc. etc. Including bizarre text effects as seen with many Postscript
  193. programs.
  194.  
  195. Users can specify weights directly in their applications (make it 10%
  196. bolder, etc.)!
  197.  
  198. Oliver Steele wrote some AMAZING high speed graphics demos that showcased
  199. QD GX and two of them,  "deflection angle" and "velocity lines" are
  200. definite collector items.
  201.  
  202. Like postscript, a path drawing a line cannot be truly "dashed". Like
  203. postscript the beginning and the ending of a path can have special
  204. endcaps. Endcaps are allowed to be "negative" (erasing)
  205.  
  206. QD GX supports multiple monitors. Apple acknowledged that Radius invented
  207. multiple monitor drawing first, not them or anyone else in the industry.
  208.  
  209. You cannot crash QDGX when its many many debugging options are enabled. 
  210.  
  211. QD GX uses ZERO BYTES OF APPLICATION HEAP and stores all its structures in
  212. its own very special heap structures. It uses almost no Macintosh
  213. routines. It does not ever use the memory manager. It cannot run out of
  214. memory if disk space is available.
  215.  
  216. Disk is used as memory FOR ANY AND ALL OPERATIONS! QDGX can work on
  217. immense bitmaps, far larger than supportable in RAM. Sadly, Cary Clark
  218. calls this "backing store" instead of "virtual memory" because he likes
  219. anal retentive 1967 IBM mainframe buzzwords.
  220.  
  221. QD GX has a special debugger, BUT THEY WERE NOT ALLOWED TO SHOW IT. Odd.
  222. very odd.
  223.  
  224. No recalculations are made in QD GX, it has lots of optimization
  225. strategies of all kinds (as does display postscript) but unlike its
  226. competitor, it can warn the user if wasteful code is being generated. Plus
  227. it never calculates any intermediate variable that is not eventually
  228. actually needed! If true I am impressed! It would be almost psychic-ware.
  229.  
  230. It runs (theoretically) in system 6, but needs 7.0 for printing of any kind.
  231.  
  232. The famous QD pattern scrolling bug (user preference?) is now selectable
  233. by programmer, patterns can be fixed or positional.
  234.  
  235. No assembly (very little) is used. Because they are greedy opportunistic
  236. pigs that are thinking of saving time porting it again and again
  237. naturally, but I feel that when 250,000 Motorola boxes from Apple ship per
  238. month they can afford to hire a few real programmers. GEEZ! Never in my
  239. life have I heard someone brag that almost none of their GRAPHICS ROUTINES
  240. are written in assembly.
  241.  
  242.  
  243. MAJOR LIMITATION: all views and bitmaps based on pixels can have more than
  244. 32K pixels per square side. EVER. But amazingly, QD GX will "butt-end"
  245. giant bitmaps through the system and accurately align and join them (even
  246. through translation, and distortion) so that you can extract and
  247. manipulate portions of them. In effect an INFINITE SIZED bitmap can be
  248. processed. (A satellite imaging company in the audience asked the question
  249. because all their photos have more than 32,000 pixels per side!)
  250.  
  251. Source code was handed out. An unprecedented amount of libraries and
  252. source code will be available before and after QD GX's debut.
  253.  
  254. ============================================================
  255.  
  256.  
  257. Whew! I have countless other pages of opinions and rambling drivel
  258. covering many other sessions at the WWDC written in the same manner if
  259. anyone is interested in my remarks on other Apple technologies.
  260.  
  261. Bill Williams (NOT familiar with QuickDraw GX yet)
  262.  
  263.  
  264.