home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Converters / Convert_PICT / Source / CommentedPSCode / RCS / Miscellaneous,v < prev    next >
Encoding:
Text File  |  1995-06-12  |  16.8 KB  |  763 lines

  1. head     1.8;
  2. branch   ;
  3. access   ;
  4. symbols  beta10:1.7;
  5. locks    death:1.8;
  6. comment  @# @;
  7.  
  8.  
  9. 1.8
  10. date     93.04.04.23.30.47;  author death;  state Exp;
  11. branches ;
  12. next     1.7;
  13.  
  14. 1.7
  15. date     93.01.09.21.07.31;  author death;  state Exp;
  16. branches ;
  17. next     1.6;
  18.  
  19. 1.6
  20. date     93.01.01.11.51.38;  author death;  state Exp;
  21. branches ;
  22. next     1.5;
  23.  
  24. 1.5
  25. date     92.12.31.15.35.05;  author death;  state Exp;
  26. branches ;
  27. next     1.4;
  28.  
  29. 1.4
  30. date     92.12.05.23.07.31;  author death;  state Exp;
  31. branches ;
  32. next     1.3;
  33.  
  34. 1.3
  35. date     92.12.03.18.02.04;  author death;  state Exp;
  36. branches ;
  37. next     1.2;
  38.  
  39. 1.2
  40. date     92.11.27.19.38.10;  author death;  state Exp;
  41. branches ;
  42. next     1.1;
  43.  
  44. 1.1
  45. date     92.11.08.09.28.59;  author death;  state Exp;
  46. branches ;
  47. next     ;
  48.  
  49.  
  50. desc
  51. @@
  52.  
  53.  
  54. 1.8
  55. log
  56. @Sun Apr  4 23:30:47 PDT 1993
  57. @
  58. text
  59. @%BEGIN Miscellaneous
  60.  
  61. %%%%%%%%%%%%%
  62. %    Note:
  63. %        penWidth and penHeight 'defined' in Common code.
  64. %%%%%%%%%%%%%
  65.  
  66. %%%%%%%%%%%%%
  67. %    Name:    pnSize        [0007]
  68. %    Syntax:    x y pnSize -
  69. %    About:    Set the width and height of the pen, given parameters
  70. %%%%%%%%%%%%%
  71. /pnSize
  72. {
  73.     /penHeight exch def
  74.     /penWidth exch def
  75. }
  76. def
  77.  
  78. %%%%%%%%%%%%%
  79. %    Name:    pnMode        [0008]
  80. %    Syntax:    mode-name pnMode -
  81. %    About:    Given the name of a drawing mode, store it in a 'global', (it
  82. %            should be a pat* or notpat* mode). We don't check it, though.
  83. %%%%%%%%%%%%%
  84. /pnMode
  85.     { /patternMode exch def }
  86. def
  87.  
  88. %%%%%%%%%%%%%
  89. %    Name:    origin        [000C]
  90. %    Syntax:    num num origin -
  91. %    About:    Shift the origin of the coordinate system, given an x & y delta
  92. %%%%%%%%%%%%%
  93. /origin
  94.     { translate }
  95. def
  96.  
  97. %%%%%%%%%%%%%
  98. %    Name:    pnLocHFrac        [0015]
  99. %    Syntax:    num pnLocHFrac -
  100. %    About:    This corresponds to the 0015 opcode that allows finer placement
  101. %            of the pen on the mac.  I couldn't determine what it did
  102. %            precisely. So, I ignore it.
  103. %%%%%%%%%%%%%
  104. /pnLocHFrac
  105.     {pop}
  106. def
  107.  
  108. %%%%%%%%%%%%%
  109. %    Name:    hiliteMode        [001C]
  110. %    Syntax:    - hiliteMode -
  111. %    About:    'this opcode is sent before a drawing operation that uses the hilite mode.'
  112. %            (according to Inside Mac V p. 103).  I just ignore it.
  113. %%%%%%%%%%%%%
  114. /hiliteMode
  115.     {}
  116. def
  117.  
  118. %END Miscellaneous
  119. @
  120.  
  121.  
  122. 1.7
  123. log
  124. @Sat Jan  9 21:07:31 PST 1993
  125. @
  126. text
  127. @@
  128.  
  129.  
  130. 1.6
  131. log
  132. @Fri Jan  1 11:51:38 PST 1993
  133. @
  134. text
  135. @@
  136.  
  137.  
  138. 1.5
  139. log
  140. @Thu Dec 31 15:35:04 PST 1992
  141. @
  142. text
  143. @@
  144.  
  145.  
  146. 1.4
  147. log
  148. @Sat Dec  5 23:07:30 PST 1992
  149. @
  150. text
  151. @d3 4
  152. a6 23
  153. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  154. %    Utility routine:     QDpattern    convertPattern pattern
  155. %    Description: This takes an 8 byte binary string representing a quickdraw pattern,
  156. %    and then converts it into a form we can use here.  In Level 2, this should turn the
  157. %    information into a pattern using this as an image.  For now, we KLUDGE it by
  158. %    gauging the approximate 'darkness' of the pattern, and then using a corresponding
  159. %    grey value
  160. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  161. /GetPatGrey
  162. {
  163.     /QDpattern exch def
  164.     /darkness 0 def
  165.     
  166.     % get the percent darkness of each row, and add these together
  167.     0 1 7
  168.     {
  169.         QDpattern exch get    % get the control variable-th byte from the pattern
  170.         255 div darkness add
  171.         /darkness exch def
  172.     }
  173.     for
  174.     0 darkness 8 div sub 1 add    % push the average darkness of all 8 rows 
  175. } def
  176. d8 2
  177. a9 34
  178.  
  179.  
  180. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  181. %    Opcode:    0000
  182. %    Name:    NOP
  183. %    Syntax:    n/a
  184. %    Description:
  185. %        this one never gets written out to PS.  No reason to.
  186. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  187.  
  188.  
  189. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  190. %    Opcode:    0002
  191. %    Name:    BkPat
  192. %    Syntax:    <8-byte binary string> 0 BkPat -
  193. %    Description:
  194. %        This stores the background pattern as being the patten data that
  195. %        this was passed. See usePattern for howthis is actually used.
  196. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  197. /bkPat
  198. {
  199.     /qdpattype exch def
  200.     /qdpatdata exch def
  201.     backPattern begin
  202.         /QDPatType qdpattype def
  203.         /QDPatData qdpatdata def
  204.         /QDPatGrey  qdpatdata GetPatGrey def
  205.     end
  206. } def
  207.  
  208.  
  209. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  210. %    Opcode:    0007
  211. %    Name:    PnSize
  212. d11 2
  213. a12 6
  214. %    Description:
  215. %        This takes two numbers, and sets the width and the height of
  216. %        the drawing pen to these values. (the drawing pen variables
  217. %        are stored in the Common portion of this code.
  218. %    Bugs:
  219. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  220. d17 2
  221. a18 1
  222. } def
  223. d20 6
  224. a25 14
  225.  
  226.  
  227. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  228. %    Opcode:    0008
  229. %    Name:    PnMode
  230. %    Syntax:    name pnMode -
  231. %    Description:
  232. %        This takes the name of a graphics mode, and theoretically would
  233. %        act properly on it, by changing the mode used when painting and all.
  234. %        (the mode would be a pat* ore notpat* mode).
  235. %        Note: The mode /badMode is passed to us if something went wrong.
  236. %    Bugs:
  237. %        This does nothing, except ignore it's argument.
  238. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  239. d27 1
  240. a27 1
  241.     { pop }
  242. d30 5
  243. a34 50
  244.  
  245. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  246. %    Opcode:    0009
  247. %    Name:    PnPat
  248. %    Syntax:    <8-byte binary string> 0 pnPat -
  249. %    Description:
  250. %        This stores the pen pattern as being the patten data that
  251. %        this was passed. See usePattern for how this ends up being used.
  252. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  253. /pnPat
  254. {
  255.     /qdpattype exch def
  256.     /qdpatdata exch def
  257.     penPattern begin
  258.         /QDPatType qdpattype def
  259.         /QDPatData qdpatdata def
  260.         /QDPatGrey  qdpatdata GetPatGrey def
  261.     end
  262. } def
  263.  
  264.  
  265. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  266. %    Opcode:    000A
  267. %    Name:    FillPat
  268. %    Syntax:    <8-byte binary string> 0 fillPat -
  269. %    Description:
  270. %        This stores the fill pattern as being the patten data that
  271. %        this was passed. See usePattern for how this ends up being used.
  272. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  273. /fillPat
  274. {
  275.     /qdpattype exch def
  276.     /qdpatdata exch def
  277.     fillPattern begin
  278.         /QDPatType qdpattype def
  279.         /QDPatData qdpatdata def
  280.         /QDPatGrey  qdpatdata GetPatGrey def
  281.     end
  282. } def
  283.  
  284.  
  285. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  286. %    Opcode:    000C
  287. %    Name:    Origin
  288. %    Syntax:
  289. %        num num origin -
  290. %    Description:
  291. %        This shifts the current origin of the coordinate system, given the
  292. %        delta x and delta y we were passed.
  293. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  294. d39 2
  295. a40 123
  296.  
  297. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  298. %    Opcode:    000E
  299. %    Name:    fgColor
  300. %    Syntax:
  301. %        [red green blue] fgColor -
  302. %        num fgColor -
  303. %    Description:
  304. %        This is passed an array of three numbers representing an RGB color
  305. %        value which was converted from an old-style mac color.  It then just stores
  306. %        this in a 'global' for later use.   There is a small chance that the value
  307. %        passed may be a number instead of an array.  This is for when an unexpected
  308. %        color value was found.  That value is written out directly, so that some
  309. %        enterprising soul can fix the ps code to get the thing to work rather than
  310. %        have to find a compiler to fix the probram.
  311. %        Note: 'foreground' refers to the pixels turned 'on' (e.g. black) when drawing a
  312. %        shape, and background refers to those not turned on (e.g. white).
  313. %    Bugs:
  314. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  315. /fgColor
  316. {
  317.     /colorValue exch def
  318.     %
  319.     %    Check the data type of the value we were passed
  320.     %
  321.     colorValue type   /arraytype eq
  322.         { /foregroundColor colorValue def}
  323.         { pop /foregroundColor [0 0 0] def }
  324.     ifelse
  325. } def
  326.  
  327.  
  328. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  329. %    Opcode:    000F
  330. %    Name:    bkColor
  331. %    Syntax:
  332. %        [red green blue] bkColor -
  333. %        num bkColor -
  334. %    Description:
  335. %        Just like forground color, but applies to background colors
  336. %    Bugs:
  337. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  338. /bkColor
  339. {
  340.     /colorValue exch def
  341.     %
  342.     %    Check the data type of the value we were passed
  343.     %
  344.     colorValue type   /arraytype eq
  345.         { /backgroundColor colorValue  def}
  346.         {pop  /backgroundColor [0 0 0] def }
  347.     ifelse
  348. } def
  349.  
  350. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  351. %    Opcode:    0011
  352. %    Name:    version
  353. %    Syntax:    n/a
  354. %    Description:
  355. %        This opcode should actually never be written out
  356. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  357.  
  358.  
  359. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  360. %    Opcode:    0012
  361. %    Name:    BkPixPat
  362. %    Syntax:    pattern-data [r g b] 2 BkPixPat -
  363. %    Description:
  364. %        This takes the specified data, and stores it in the background pattern
  365. %        dictionary for future use.
  366. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  367. /bkPixPat
  368. {
  369.     backPattern begin
  370.         /QDPatType exch def
  371.         /QDColorValue exch def
  372.     end
  373.     pop % the 8 byte pattern data.  We really dont care about it since the color will suffice
  374. }
  375. def
  376.  
  377.  
  378. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  379. %    Opcode:    0013
  380. %    Name:    PnPixPat
  381. %    Syntax:    pattern-data [r g b] 2 PnPixPat -
  382. %    Description:
  383. %        This takes the specified data, and stores it in the background pattern
  384. %        dictionary for future use.
  385. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  386. /pnPixPat
  387. {
  388.     penPattern begin
  389.         /QDPatType exch def
  390.         /QDColorValue exch def
  391.     end
  392.     pop % the 8 byte pattern data.  We really dont care about it since the color will suffice
  393. }
  394. def
  395.  
  396.  
  397. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  398. %    Opcode:    0014
  399. %    Name:    fillPixPat
  400. %    Syntax:    pattern-data [r g b] 2 fillPixPat -
  401. %    Description:
  402. %        This takes the specified data, and stores it in the background pattern
  403. %        dictionary for future use.
  404. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  405. /fillPixPat
  406. {
  407.     fillPattern begin
  408.         /QDPatType exch def
  409.         /QDColorValue exch def
  410.     end
  411.     pop % the 8 byte pattern data.  We really dont care about it since the color will suffice
  412. }
  413. def
  414.  
  415.  
  416. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  417. %    Opcode:    0015
  418. %    Name:    pnLocHFrac
  419. d42 4
  420. a45 7
  421. %    Description:
  422. %        This corresponds to one of the PICT 2 opcodes.  This appears to allow for
  423. %        the finer positioning of the pen on the Mac.
  424. %    Bugs:
  425. %        This does nothing.    I could not determine exactly the meaning
  426. %        of its argument, or precisely what the whole does.
  427. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  428. d50 2
  429. a51 36
  430.  
  431. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  432. %    Opcode:    001A
  433. %    Name:    RGBFgColor
  434. %    Syntax:    [red green blue] RGBFgColor -
  435. %    Description:
  436. %        This takes an array of three values to make up an rgb color value.
  437. %        This color value is then stored as the foreground color (it affects
  438. %        those portions that would be painted 'black' in a drawing operation).
  439. %        The text and pattern code will actually put this to use.
  440. %    Bugs:
  441. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  442. /RGBFgCol
  443.     { /foregroundColor exch def } 
  444. def
  445.  
  446.  
  447. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  448. %    Opcode:    001B
  449. %    Name:    RGBBkCol
  450. %    Syntax:    [red green blue] RGBBkCol -
  451. %    Description:
  452. %        This takes an array of three values to make up an rgb color value.
  453. %        This color value is then stored as the background color (it affects
  454. %        those portions that would be painted 'white' in a drawing operation).
  455. %        The text and pattern code will actually put the value to use.
  456. %    Bugs:
  457. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  458. /RGBBkCol
  459.     { /backgroundColor exch def }
  460. def
  461.  
  462.  
  463. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  464. %    Opcode:    001C
  465. %    Name:    hiliteMode
  466. d53 3
  467. a55 6
  468. %    Description:
  469. %        This corresponds to one of the PICT 2 opcodes.  'this opcode is sent before
  470. %        a drawing operation that uses the hilite mode.' (according to Inside Mac V p. 103)
  471. %    Bugs:
  472. %        Clearly, I'm ignoring it.
  473. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  474. a58 64
  475.  
  476.  
  477. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  478. %    Opcode:    001D
  479. %    Name:    hiliteColor
  480. %    Syntax:    [red green blue] hiliteColor -
  481. %    Description:
  482. %        There is a drawing mode available in PICT 2 images that appears to
  483. %        allow a shape or shapes to be drawn with a highlight color, when
  484. %        selected say.  I'm not clear exactly what it does, and it doesn't sound like
  485. %        it's going to be relevant to this.  Nevertheless, the color is written out
  486. %        in case it turns out it should be implemented later.
  487. %    Bugs:
  488. %        I'm ignoring it for now.
  489. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  490. /hiliteColor
  491.     { pop }
  492. def
  493.  
  494.  
  495. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  496. %    Opcode:    001E
  497. %    Name:    defHilite
  498. %    Syntax:    - defHilite -
  499. %    Description:
  500. %        According to Inside Mac V, p. 103, this sounds like it replaces the
  501. %        color set up with 1D, above, with a default value from low memory.
  502. %    Bugs:
  503. %        As I'm ignoring 1D, I'm ignoring this for now.
  504. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  505. /defHilite
  506.     {}
  507. def
  508.  
  509.  
  510. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  511. %    Opcode:    001F
  512. %    Name:    OpColor
  513. %    Syntax:    [red green blue] OpColor -
  514. %    Description:
  515. %        This appears to set a color value for some of the PICT2
  516. %        drawing modes (blend, addpin, and subpin). 
  517. %    Bugs:
  518. %        Since this doesn't implement any of the drawing modes, we ignore this too.
  519. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  520. /OpColor
  521.     { pop }
  522. def
  523.  
  524.  
  525. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  526. %    Opcode:    00C0
  527. %    Name:    headerOp
  528. %    Syntax:    num num num num num num headerOp -
  529. %    Description:
  530. %        Another of those fine opcodes that isn't very well defined.
  531. %        It's a pict2 opcode.  It takes -1, followed by 4 32bit numbers, follwoed by -1 (I think)
  532. %        At the moment is appears to do nothing crucial.  So, we ignore it.
  533. %    Bugs:
  534. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  535. /headerOp
  536.     {pop pop pop pop pop pop}
  537. def
  538.  
  539. @
  540.  
  541.  
  542. 1.3
  543. log
  544. @Thu Dec  3 18:02:03 PST 1992
  545. @
  546. text
  547. @d11 1
  548. a11 1
  549. /convertPattern
  550. d24 1
  551. a24 1
  552.     darkness 8 div    % push the average darkness of all 8 rows 
  553. d39 6
  554. a44 3
  555. %    Opcode 2: BkPat
  556. %    macPattern bkPat -
  557. %    Sets the background pattern to be used
  558. d48 7
  559. a54 2
  560.     convertPattern
  561.     /backPattern exch def
  562. d94 6
  563. a99 3
  564. %    Opcode 9: PnPat
  565. %    macPattern pnPat -
  566. %    Sets the pen pattern to be used
  567. d103 7
  568. a109 2
  569.     convertPattern
  570.     /penPattern exch def
  571. d114 6
  572. a119 3
  573. %    Opcode A: FillPat
  574. %    macPattern fillPat -
  575. %    Sets the fill pattern to be used
  576. d123 7
  577. a129 2
  578.     convertPattern
  579.     /fillPattern exch def
  580. d210 6
  581. a215 3
  582. %    Opcode 0012: BkPixPat    *limited*
  583. %    pattern red green blue bkPixPat 
  584. %    This corresponds to one of the PICT 2 opcodes.  
  585. d218 7
  586. a224 1
  587.     {skipPict2Pattern}
  588. d227 1
  589. d229 6
  590. a234 3
  591. %    Opcode 0013: PnPixPat    *limited*
  592. %    pattern red green blue bkPixPat 
  593. %    This corresponds to one of the PICT 2 opcodes.  
  594. d236 8
  595. a243 2
  596. /penPixPat
  597.     {skipPict2Pattern}
  598. d246 1
  599. d248 6
  600. a253 3
  601. %    Opcode 0014: fillPixPat    *limited*
  602. %    pattern red green blue bkPixPat 
  603. %    This corresponds to one of the PICT 2 opcodes.  
  604. d256 7
  605. a262 1
  606.     {skipPict2Pattern}
  607. @
  608.  
  609.  
  610. 1.2
  611. log
  612. @Fri Nov 27 19:38:09 PST 1992
  613. @
  614. text
  615. @@
  616.  
  617.  
  618. 1.1
  619. log
  620. @Sun Nov  8 09:28:59 PST 1992
  621. @
  622. text
  623. @d1 1
  624. a1 10
  625. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  626. %    Utility routine:     convertMacColor
  627. %    macColor convertMacColor psColor
  628. %    This takes a value (an old-style Mac color) and converts it to a PS equivalent.
  629. %    for now it does naught.  Note that this mac color could be a number,
  630. %    or a pre-defined name...
  631. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  632. /convertMacColor
  633.     {}
  634. def
  635. a2 1
  636.  
  637. a27 4
  638. /skipPict2Pattern
  639. {
  640.     %%!!!!!!! @@@@@@@@@@@@@@
  641. } def
  642. a28 1
  643.  
  644. d30 5
  645. a34 2
  646. %    Opcode 0: NOP
  647. %    this one never gets written out to PS.  No reason to.
  648. d110 7
  649. a116 3
  650. %    Opcode C: Origin
  651. %    x y origin -
  652. %    This shifts the current origin of the coordinate system. We get a deltax and delta y.
  653. d119 2
  654. a120 3
  655. {
  656.     translate    % the deltas are already on the stack
  657. } def
  658. d124 16
  659. a139 4
  660. %    Opcode E: fgColor
  661. %    macColor fgColor -
  662. %    This reads in the specifid macColor (either as a number or as one of the
  663. %    predefined names) and sets it to being the foreground color.
  664. d143 8
  665. a150 2
  666.     convertMacColor
  667.     /fgColor exch def
  668. d155 8
  669. a162 4
  670. %    Opcode F: bkColor
  671. %    macColor bkColor -
  672. %    This gets the specified macColor converted to a PS color, and makes it the
  673. %    background color.
  674. d164 1
  675. a164 1
  676. /fgColor
  677. d166 8
  678. a173 2
  679.     convertMacColor
  680.     /bkColor exch def
  681. a175 1
  682.  
  683. d177 5
  684. a181 2
  685. %    Opcode 11: version
  686. %    this opcode should actually never be written out
  687. a184 1
  688.  
  689. a228 1
  690.  
  691. d230 9
  692. a238 6
  693. %    Opcode 001A: RGBFgColor
  694. %    red green blue RGBFgColor -
  695. %    This corresponds to one of the PICT 2 opcodes.  Theoretically, it takes
  696. %    RGB components, and sets the foreground color (again, presumably, used by
  697. %    the fill opcodes.  However, I have no idea how it interacts with patterns etc)
  698. %    I'm just ignoring it, save for poping its arguments.
  699. d241 1
  700. a241 1
  701.     {pop pop pop}
  702. d246 9
  703. a254 6
  704. %    Opcode 001B: RGBBkCol
  705. %    red green blue RGBBkColor -
  706. %    This corresponds to one of the PICT 2 opcodes.  Theoretically, it takes
  707. %    RGB components, and sets the background color (presumably, used by
  708. %    the erase opcodes.  However, I have no idea how it interacts with patterns etc)
  709. %    I'm just ignoring it, save for poping its arguments.
  710. d257 1
  711. a257 1
  712.     {pop pop pop}
  713. d260 1
  714. d262 8
  715. a269 5
  716. %    Opcode 001C: hiliteMode
  717. %    - hiliteMode -
  718. %    This corresponds to one of the PICT 2 opcodes.  'this opcode is sent before
  719. %    a drawing operation that uses the hilite mode.' (according to Inside Mac V p. 103)
  720. %    Clearly I'm just ignoring it.
  721. d275 1
  722. d277 11
  723. a287 6
  724. %    Opcode 001D: HiliteColor
  725. %    red green blue hiliteColor -
  726. %    This corresponds to one of the PICT 2 opcodes.  Theoretically, it takes
  727. %    RGB components, and sets the hilite color used in hilite mode...  But I really
  728. %    can't tell you what that entails.
  729. %    I'm just ignoring it, save for poping its arguments.
  730. d290 1
  731. a290 1
  732.     {pop pop pop}
  733. d295 8
  734. a302 5
  735. %    Opcode 001E: defHilite
  736. %    - defHilite -
  737. %    This corresponds to one of the PICT 2 opcodes.  'set hilite to default
  738. %    (from low memory).' (according to Inside Mac V p. 103)
  739. %    Clearly I'm just ignoring it.
  740. d310 8
  741. a317 5
  742. %    Opcode 001F: OpColor
  743. %    red green blue hiliteColor -
  744. %    This corresponds to one of the PICT 2 opcodes.  'RGB OpColor for
  745. %    arithmetic modes' (inside mac V p. 103.
  746. %    Not applicable at present, so just pop the arguments.
  747. d319 2
  748. a320 2
  749. /hiliteColor
  750.     {pop pop pop}
  751. a323 1
  752.  
  753. d325 8
  754. a332 6
  755. %    Opcode c0: header op
  756. %    num num num num num num headerOp -
  757. %    Another of those fine opcodes that isn't very well defined.
  758. %    in Pict2  (doesn't exist in Pict1), this takes -1, followed by four 32 bit numbers
  759. %    followed by -1.  I think.  At the moment is appears to do nothing crucial.
  760. %    So, we ignore it.
  761. d338 2
  762. @
  763.