home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 (1993) / nebula.bin / SourceCode / AdobeExamples / NX_LineDraw / sym / DrawViewWraps.c next >
Encoding:
C/C++ Source or Header  |  1993-06-19  |  25.9 KB  |  761 lines

  1. /* ./sym/DrawViewWraps.c generated from DrawViewWraps.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "DrawViewWraps.psw"
  9.  
  10. /*
  11.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  12.  *
  13.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  14.  *    System Software Development Kit from Adobe Systems Incorporated,
  15.  *    then this copy is designated as Development Software and its use is
  16.  *    subject to the terms of the License Agreement attached to such Kit.
  17.  *
  18.  * (c)  If this Sample Code is distributed independently, then the following
  19.  *    terms apply:
  20.  *
  21.  * (d)  This file may be freely copied and redistributed as long as:
  22.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  23.  *    2) If the file has been modified in any way, a notice of such
  24.  *      modification is conspicuously indicated.
  25.  *
  26.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  27.  *    Adobe Systems Incorporated.
  28.  * 
  29.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  30.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  31.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  32.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  33.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  34.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  35.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  36.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  37.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  38.  *    OF THIRD PARTY RIGHTS.
  39.  */
  40.  
  41. /*
  42. *    DrawViewWraps.psw
  43. *
  44. *    Here lie the wraps used in DrawView.m for the LineDrawing application.
  45. *    Several ways to draw lines are shown here.  One that is not is to use the
  46. *    single operator functions from the method directly.
  47. *
  48. *    PostScript operators obtain their operands from the stack.
  49. *    As a result the order of placing the operands on the stack is very important.
  50. *    In the examples below,  comments are used in the bound procedures
  51. *    to indicate the operands on stack when the procedure is called.
  52. *    One common problem area is to inadvertently place the operands on 
  53. *    stack in the wrong order. 
  54. *
  55. *    Version:    2.0
  56. *    Author:    Ken Anderson, Ken Fromm
  57. *    History:
  58. *            03-07-91        Added this comment.
  59. */
  60.  
  61. /* StartTime is stored in the interpreter and contains the initial real time */
  62. #line 63 "./sym/DrawViewWraps.c"
  63. void PSWMarkTime( void )
  64. {
  65.   typedef struct {
  66.     unsigned char tokenType;
  67.     unsigned char topLevelCount;
  68.     unsigned short nBytes;
  69.  
  70.     DPSBinObjGeneric obj0;
  71.     DPSBinObjGeneric obj1;
  72.     DPSBinObjGeneric obj2;
  73.     char obj3[9];
  74.     } _dpsQ;
  75.   static const _dpsQ _dpsF = {
  76.     DPS_DEF_TOKENTYPE, 3, 37,
  77.     {DPS_LITERAL|DPS_NAME, 0, 9, 24},    /* StartTime */
  78.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  79.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  80.     {'S','t','a','r','t','T','i','m','e'},
  81.     }; /* _dpsQ */
  82.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  83.   char pad[3];
  84.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,37);
  85.   if (0) *pad = 0;    /* quiets compiler warnings */
  86. }
  87. #line 56 "DrawViewWraps.psw"
  88.  
  89.  
  90. /* The difference between the current real time and the initial time stored                */
  91. /* in StartTime is returned to the calling procedure in the output arg ElapsedTime. */
  92. #line 93 "./sym/DrawViewWraps.c"
  93. void PSWReturnTime(int *ElapsedTime)
  94. {
  95.   typedef struct {
  96.     unsigned char tokenType;
  97.     unsigned char topLevelCount;
  98.     unsigned short nBytes;
  99.  
  100.     DPSBinObjGeneric obj0;
  101.     DPSBinObjGeneric obj1;
  102.     DPSBinObjGeneric obj2;
  103.     DPSBinObjGeneric obj3;
  104.     DPSBinObjGeneric obj4;
  105.     DPSBinObjGeneric obj5;
  106.     DPSBinObjGeneric obj6;
  107.     DPSBinObjGeneric obj7;
  108.     DPSBinObjGeneric obj8;
  109.     char obj9[9];
  110.     } _dpsQ;
  111.   static const _dpsQ _dpsF = {
  112.     DPS_DEF_TOKENTYPE, 9, 85,
  113.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},    /* realtime */
  114.     {DPS_EXEC|DPS_NAME, 0, 9, 72},    /* StartTime */
  115.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  116.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  117.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  118.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  119.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  120.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},    /* printobject */
  121.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},    /* flush */
  122.     {'S','t','a','r','t','T','i','m','e'},
  123.     }; /* _dpsQ */
  124.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  125.   char pad[3];
  126.   DPSResultsRec _dpsR[1];
  127.   static const DPSResultsRec _dpsRstat[] = {
  128.     { dps_tInt, -1 },
  129.     };
  130.     _dpsR[0] = _dpsRstat[0];
  131.     _dpsR[0].value = (char *)ElapsedTime;
  132.  
  133.   DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  134.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,85);
  135.   DPSAwaitReturnValues(_dpsCurCtxt);
  136.   if (0) *pad = 0;    /* quiets compiler warnings */
  137. }
  138. #line 63 "DrawViewWraps.psw"
  139.  
  140.  
  141. /*
  142. * This wrap is called in the +newFrame:(NXRect *) frm method to
  143. * define and bind procedures in the interpreter.  These procedures
  144. * are then called from within other wraps. Binding replaces each
  145. * executable operator name with its value.  During execution of the
  146. * procedures, the interpreter encounters the operators themselves
  147. * instead of the names of the operators.  A procedure that has been
  148. * bounded will execute faster than one that has not been bound. 
  149. * Certain caveats pertain; see the red book for further information.
  150. */
  151. #line 152 "./sym/DrawViewWraps.c"
  152. void PSWDefs( void )
  153. {
  154.   typedef struct {
  155.     unsigned char tokenType;
  156.     unsigned char topLevelCount;
  157.     unsigned short nBytes;
  158.  
  159.     DPSBinObjGeneric obj0;
  160.     DPSBinObjGeneric obj1;
  161.     DPSBinObjGeneric obj2;
  162.     DPSBinObjGeneric obj3;
  163.     DPSBinObjGeneric obj4;
  164.     DPSBinObjGeneric obj5;
  165.     DPSBinObjGeneric obj6;
  166.     DPSBinObjGeneric obj7;
  167.     DPSBinObjGeneric obj8;
  168.     DPSBinObjGeneric obj9;
  169.     DPSBinObjGeneric obj10;
  170.     DPSBinObjGeneric obj11;
  171.     DPSBinObjGeneric obj12;
  172.     DPSBinObjGeneric obj13;
  173.     DPSBinObjGeneric obj14;
  174.     DPSBinObjGeneric obj15;
  175.     DPSBinObjGeneric obj16;
  176.     DPSBinObjGeneric obj17;
  177.     DPSBinObjGeneric obj18;
  178.     DPSBinObjGeneric obj19;
  179.     DPSBinObjGeneric obj20;
  180.     DPSBinObjGeneric obj21;
  181.     DPSBinObjGeneric obj22;
  182.     DPSBinObjGeneric obj23;
  183.     DPSBinObjGeneric obj24;
  184.     DPSBinObjGeneric obj25;
  185.     DPSBinObjGeneric obj26;
  186.     DPSBinObjGeneric obj27;
  187.     DPSBinObjGeneric obj28;
  188.     DPSBinObjGeneric obj29;
  189.     DPSBinObjGeneric obj30;
  190.     DPSBinObjGeneric obj31;
  191.     DPSBinObjGeneric obj32;
  192.     DPSBinObjGeneric obj33;
  193.     DPSBinObjGeneric obj34;
  194.     DPSBinObjGeneric obj35;
  195.     DPSBinObjGeneric obj36;
  196.     DPSBinObjGeneric obj37;
  197.     DPSBinObjGeneric obj38;
  198.     DPSBinObjGeneric obj39;
  199.     DPSBinObjGeneric obj40;
  200.     DPSBinObjGeneric obj41;
  201.     DPSBinObjGeneric obj42;
  202.     DPSBinObjGeneric obj43;
  203.     DPSBinObjGeneric obj44;
  204.     DPSBinObjGeneric obj45;
  205.     DPSBinObjGeneric obj46;
  206.     DPSBinObjGeneric obj47;
  207.     DPSBinObjGeneric obj48;
  208.     DPSBinObjGeneric obj49;
  209.     DPSBinObjGeneric obj50;
  210.     DPSBinObjGeneric obj51;
  211.     DPSBinObjGeneric obj52;
  212.     DPSBinObjGeneric obj53;
  213.     DPSBinObjGeneric obj54;
  214.     DPSBinObjGeneric obj55;
  215.     DPSBinObjGeneric obj56;
  216.     DPSBinObjGeneric obj57;
  217.     DPSBinObjGeneric obj58;
  218.     DPSBinObjGeneric obj59;
  219.     DPSBinObjGeneric obj60;
  220.     DPSBinObjGeneric obj61;
  221.     DPSBinObjGeneric obj62;
  222.     DPSBinObjGeneric obj63;
  223.     DPSBinObjGeneric obj64;
  224.     DPSBinObjGeneric obj65;
  225.     DPSBinObjGeneric obj66;
  226.     DPSBinObjGeneric obj67;
  227.     DPSBinObjGeneric obj68;
  228.     DPSBinObjGeneric obj69;
  229.     DPSBinObjGeneric obj70;
  230.     DPSBinObjGeneric obj71;
  231.     DPSBinObjGeneric obj72;
  232.     DPSBinObjGeneric obj73;
  233.     DPSBinObjGeneric obj74;
  234.     DPSBinObjGeneric obj75;
  235.     char obj76[4];
  236.     char obj77[4];
  237.     char obj78[3];
  238.     char obj79[3];
  239.     char obj80[3];
  240.     char obj81[3];
  241.     char obj82[3];
  242.     char obj83[3];
  243.     char obj84[4];
  244.     char obj85[3];
  245.     char obj86[3];
  246.     } _dpsQ;
  247.   static const _dpsQ _dpsF = {
  248.     DPS_DEF_TOKENTYPE, 20, 648,
  249.     {DPS_LITERAL|DPS_NAME, 0, 3, 641},    /* EVB */
  250.     {DPS_EXEC|DPS_ARRAY, 0, 7, 552},
  251.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  252.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  253.     {DPS_LITERAL|DPS_NAME, 0, 3, 638},    /* DLB */
  254.     {DPS_EXEC|DPS_ARRAY, 0, 5, 512},
  255.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  256.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  257.     {DPS_LITERAL|DPS_NAME, 0, 4, 634},    /* DLRB */
  258.     {DPS_EXEC|DPS_ARRAY, 0, 9, 200},
  259.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  260.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  261.     {DPS_LITERAL|DPS_NAME, 0, 3, 631},    /* MLB */
  262.     {DPS_EXEC|DPS_ARRAY, 0, 2, 184},
  263.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  264.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  265.     {DPS_LITERAL|DPS_NAME, 0, 3, 628},    /* SLB */
  266.     {DPS_EXEC|DPS_ARRAY, 0, 3, 160},
  267.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},    /* bind */
  268.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  269.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  270.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  271.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  272.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  273.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  274.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  275.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  276.     {DPS_LITERAL|DPS_INT, 0, 0, 3},
  277.     {DPS_LITERAL|DPS_INT, 0, 0, -1},
  278.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 135},    /* roll */
  279.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  280.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  281.     {DPS_EXEC|DPS_ARRAY, 0, 30, 272},
  282.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72},    /* for */
  283.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  284.     {DPS_EXEC|DPS_NAME, 0, 3, 625},    /* PSW */
  285.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  286.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  287.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  288.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  289.     {DPS_EXEC|DPS_NAME, 0, 3, 622},    /* PSC */
  290.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  291.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  292.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  293.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  294.     {DPS_EXEC|DPS_NAME, 0, 3, 619},    /* PSX */
  295.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  296.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  297.     {DPS_EXEC|DPS_NAME, 0, 3, 616},    /* PSY */
  298.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  299.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88},    /* index */
  300.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  301.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  302.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},    /* dup */
  303.     {DPS_EXEC|DPS_NAME, 0, 4, 612},    /* PSX1 */
  304.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62},    /* exch */
  305.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  306.     {DPS_EXEC|DPS_NAME, 0, 4, 608},    /* PSY1 */
  307.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  308.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88},    /* index */
  309.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 75},    /* get */
  310.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  311.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  312.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117},    /* pop */
  313.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  314.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  315.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  316.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  317.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  318.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  319.     {DPS_LITERAL|DPS_INT, 0, 0, 2},
  320.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 88},    /* index */
  321.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128},    /* rectfill */
  322.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  323.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  324.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 129},    /* rectstroke */
  325.     {'P','S','Y','1'},
  326.     {'P','S','X','1'},
  327.     {'P','S','Y'},
  328.     {'P','S','X'},
  329.     {'P','S','C'},
  330.     {'P','S','W'},
  331.     {'S','L','B'},
  332.     {'M','L','B'},
  333.     {'D','L','R','B'},
  334.     {'D','L','B'},
  335.     {'E','V','B'},
  336.     }; /* _dpsQ */
  337.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  338.   char pad[3];
  339.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,648);
  340.   if (0) *pad = 0;    /* quiets compiler warnings */
  341. }
  342. #line 108 "DrawViewWraps.psw"
  343.  
  344.  
  345. /***  Called by -drawWraps ***/
  346. /* Calls the operators from the wrap itself. */
  347. #line 348 "./sym/DrawViewWraps.c"
  348. void PSWEraseView(float BGColor, float BGStrColor, float BGStrWidth, const float BGrect[])
  349. {
  350.   typedef struct {
  351.     unsigned char tokenType;
  352.     unsigned char topLevelCount;
  353.     unsigned short nBytes;
  354.  
  355.     DPSBinObjReal obj0;
  356.     DPSBinObjGeneric obj1;
  357.     DPSBinObjGeneric obj2;
  358.     DPSBinObjGeneric obj3;
  359.     DPSBinObjReal obj4;
  360.     DPSBinObjGeneric obj5;
  361.     DPSBinObjReal obj6;
  362.     DPSBinObjGeneric obj7;
  363.     DPSBinObjGeneric obj8;
  364.     DPSBinObjGeneric obj9;
  365.     } _dpsQ;
  366.   static const _dpsQ _dpsStat = {
  367.     DPS_DEF_TOKENTYPE, 10, 148,
  368.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGColor */
  369.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  370.     {DPS_LITERAL|DPS_ARRAY, 0, 4, 112},    /* param[const]: BGrect */
  371.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128},    /* rectfill */
  372.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGStrColor */
  373.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  374.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGStrWidth */
  375.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  376.     {DPS_LITERAL|DPS_ARRAY, 0, 4, 80},    /* param[const]: BGrect */
  377.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 129},    /* rectstroke */
  378.     }; /* _dpsQ */
  379.   _dpsQ _dpsF;    /* local copy  */
  380.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  381.   char pad[3];
  382.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  383.   register int _dps_offset = 80;
  384.   _dpsF = _dpsStat;    /* assign automatic variable */
  385.  
  386.   _dpsP[0].val.realVal = BGColor;
  387.   _dpsP[4].val.realVal = BGStrColor;
  388.   _dpsP[6].val.realVal = BGStrWidth;
  389.   _dpsP[8].val.arrayVal = _dps_offset;
  390.   _dps_offset += 4 * sizeof(DPSBinObjGeneric);
  391.   _dpsP[2].val.arrayVal = _dps_offset;
  392.   _dps_offset += 4 * sizeof(DPSBinObjGeneric);
  393.  
  394.   _dpsF.nBytes = _dps_offset+4;
  395.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,84);
  396.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
  397.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
  398.   if (0) *pad = 0;    /* quiets compiler warnings */
  399. }
  400. #line 118 "DrawViewWraps.psw"
  401.  
  402.  
  403. /* Calls the operators from the wrap itself. */
  404. #line 405 "./sym/DrawViewWraps.c"
  405. void PSWDrawLine(float LineWidth, float LineColor, float X, float Y, float X1, float Y1)
  406. {
  407.   typedef struct {
  408.     unsigned char tokenType;
  409.     unsigned char topLevelCount;
  410.     unsigned short nBytes;
  411.  
  412.     DPSBinObjReal obj0;
  413.     DPSBinObjGeneric obj1;
  414.     DPSBinObjReal obj2;
  415.     DPSBinObjGeneric obj3;
  416.     DPSBinObjReal obj4;
  417.     DPSBinObjReal obj5;
  418.     DPSBinObjGeneric obj6;
  419.     DPSBinObjReal obj7;
  420.     DPSBinObjReal obj8;
  421.     DPSBinObjGeneric obj9;
  422.     DPSBinObjGeneric obj10;
  423.     } _dpsQ;
  424.   static const _dpsQ _dpsStat = {
  425.     DPS_DEF_TOKENTYPE, 11, 92,
  426.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineWidth */
  427.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  428.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineColor */
  429.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  430.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  431.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  432.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  433.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X1 */
  434.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y1 */
  435.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  436.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  437.     }; /* _dpsQ */
  438.   _dpsQ _dpsF;    /* local copy  */
  439.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  440.   char pad[3];
  441.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  442.   _dpsF = _dpsStat;    /* assign automatic variable */
  443.  
  444.   _dpsP[0].val.realVal = LineWidth;
  445.   _dpsP[2].val.realVal = LineColor;
  446.   _dpsP[4].val.realVal = X;
  447.   _dpsP[5].val.realVal = Y;
  448.   _dpsP[7].val.realVal = X1;
  449.   _dpsP[8].val.realVal = Y1;
  450.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,92);
  451.   if (0) *pad = 0;    /* quiets compiler warnings */
  452. }
  453. #line 127 "DrawViewWraps.psw"
  454.  
  455.  
  456.  
  457. /***  Called by -drawWrapsBind  ***/
  458. /* Places the input args on the stack and calls the EraseViewBind procedure. */
  459. #line 460 "./sym/DrawViewWraps.c"
  460. void PSWEraseViewBind(float BGColor, float BGStrColor, float BGStrWidth, const float BGrect[])
  461. {
  462.   typedef struct {
  463.     unsigned char tokenType;
  464.     unsigned char topLevelCount;
  465.     unsigned short nBytes;
  466.  
  467.     DPSBinObjGeneric obj0;
  468.     DPSBinObjReal obj1;
  469.     DPSBinObjReal obj2;
  470.     DPSBinObjReal obj3;
  471.     DPSBinObjGeneric obj4;
  472.     } _dpsQ;
  473.  
  474.   typedef struct {
  475.     char obj5[3];
  476.     } _dpsQ1;
  477.   static const _dpsQ _dpsStat = {
  478.     DPS_DEF_TOKENTYPE, 5, 79,
  479.     {DPS_LITERAL|DPS_ARRAY, 0, 4, 40},    /* param[const]: BGrect */
  480.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGStrWidth */
  481.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGStrColor */
  482.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: BGColor */
  483.     {DPS_EXEC|DPS_NAME, 0, 3, 72},    /* EVB */
  484.     }; /* _dpsQ */
  485.   static const _dpsQ1 _dpsF1 = {
  486.     {'E','V','B'},
  487.     }; /* _dpsQ1 */
  488.   _dpsQ _dpsF;    /* local copy  */
  489.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  490.   char pad[3];
  491.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  492.   register int _dps_offset = 40;
  493.   _dpsF = _dpsStat;    /* assign automatic variable */
  494.  
  495.   _dpsP[3].val.realVal = BGColor;
  496.   _dpsP[2].val.realVal = BGStrColor;
  497.   _dpsP[1].val.realVal = BGStrWidth;
  498.   _dpsP[0].val.arrayVal = _dps_offset;
  499.   _dps_offset += 4 * sizeof(DPSBinObjGeneric);
  500.   _dpsP[4].val.stringVal = _dps_offset;
  501.   _dps_offset += 3;
  502.  
  503.   _dpsF.nBytes = _dps_offset+4;
  504.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
  505.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
  506.   DPSWriteStringChars(_dpsCurCtxt,(char *) &_dpsF1,3);
  507.   if (0) *pad = 0;    /* quiets compiler warnings */
  508. }
  509. #line 134 "DrawViewWraps.psw"
  510.  
  511.  
  512. /* Places the input args on the stack and calls the DrawLineBind procedure. */
  513. #line 514 "./sym/DrawViewWraps.c"
  514. void PSWDrawLineBind(float LineWidth, float LineColor, float X, float Y, float X1, float Y1)
  515. {
  516.   typedef struct {
  517.     unsigned char tokenType;
  518.     unsigned char topLevelCount;
  519.     unsigned short nBytes;
  520.  
  521.     DPSBinObjReal obj0;
  522.     DPSBinObjReal obj1;
  523.     DPSBinObjReal obj2;
  524.     DPSBinObjReal obj3;
  525.     DPSBinObjReal obj4;
  526.     DPSBinObjReal obj5;
  527.     DPSBinObjGeneric obj6;
  528.     char obj7[3];
  529.     } _dpsQ;
  530.   static const _dpsQ _dpsStat = {
  531.     DPS_DEF_TOKENTYPE, 7, 63,
  532.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X1 */
  533.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y1 */
  534.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  535.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  536.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineColor */
  537.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineWidth */
  538.     {DPS_EXEC|DPS_NAME, 0, 3, 56},    /* DLB */
  539.     {'D','L','B'},
  540.     }; /* _dpsQ */
  541.   _dpsQ _dpsF;    /* local copy  */
  542.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  543.   char pad[3];
  544.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  545.   _dpsF = _dpsStat;    /* assign automatic variable */
  546.  
  547.   _dpsP[5].val.realVal = LineWidth;
  548.   _dpsP[4].val.realVal = LineColor;
  549.   _dpsP[2].val.realVal = X;
  550.   _dpsP[3].val.realVal = Y;
  551.   _dpsP[0].val.realVal = X1;
  552.   _dpsP[1].val.realVal = Y1;
  553.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,63);
  554.   if (0) *pad = 0;    /* quiets compiler warnings */
  555. }
  556. #line 139 "DrawViewWraps.psw"
  557.  
  558.  
  559.  
  560. /***  Called by -drawWrapsRepeat  ***/
  561. /* Defines input args, places the number of repetitions on the stack and then */
  562. /* calls the DrawLineRepeatBind procedure. */
  563. #line 564 "./sym/DrawViewWraps.c"
  564. void PSWDrawLineRepeatBind(const float W[], const float C[], const float X[], const float Y[], const float X1[], const float Y1[], int i)
  565. {
  566.   typedef struct {
  567.     unsigned char tokenType;
  568.     unsigned char topLevelCount;
  569.     unsigned short nBytes;
  570.  
  571.     DPSBinObjGeneric obj0;
  572.     DPSBinObjGeneric obj1;
  573.     DPSBinObjGeneric obj2;
  574.     DPSBinObjGeneric obj3;
  575.     DPSBinObjGeneric obj4;
  576.     DPSBinObjGeneric obj5;
  577.     DPSBinObjGeneric obj6;
  578.     DPSBinObjGeneric obj7;
  579.     DPSBinObjGeneric obj8;
  580.     DPSBinObjGeneric obj9;
  581.     DPSBinObjGeneric obj10;
  582.     DPSBinObjGeneric obj11;
  583.     DPSBinObjGeneric obj12;
  584.     DPSBinObjGeneric obj13;
  585.     DPSBinObjGeneric obj14;
  586.     DPSBinObjGeneric obj15;
  587.     DPSBinObjGeneric obj16;
  588.     DPSBinObjGeneric obj17;
  589.     DPSBinObjGeneric obj18;
  590.     DPSBinObjGeneric obj19;
  591.     } _dpsQ;
  592.  
  593.   typedef struct {
  594.     char obj20[4];
  595.     char obj21[4];
  596.     char obj22[4];
  597.     char obj23[3];
  598.     char obj24[3];
  599.     char obj25[3];
  600.     char obj26[3];
  601.     } _dpsQ1;
  602.   static const _dpsQ _dpsStat = {
  603.     DPS_DEF_TOKENTYPE, 20, 188,
  604.     {DPS_LITERAL|DPS_NAME, 0, 3, 181},    /* PSW */
  605.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: W */
  606.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  607.     {DPS_LITERAL|DPS_NAME, 0, 3, 178},    /* PSC */
  608.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: C */
  609.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  610.     {DPS_LITERAL|DPS_NAME, 0, 3, 175},    /* PSX */
  611.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: X */
  612.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  613.     {DPS_LITERAL|DPS_NAME, 0, 3, 172},    /* PSY */
  614.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: Y */
  615.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  616.     {DPS_LITERAL|DPS_NAME, 0, 4, 168},    /* PSX1 */
  617.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: X1 */
  618.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  619.     {DPS_LITERAL|DPS_NAME, 0, 4, 164},    /* PSY1 */
  620.     {DPS_LITERAL|DPS_ARRAY, 0, 0, 160},    /* param[var]: Y1 */
  621.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  622.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: i */
  623.     {DPS_EXEC|DPS_NAME, 0, 4, 160},    /* DLRB */
  624.     }; /* _dpsQ */
  625.   static const _dpsQ1 _dpsF1 = {
  626.     {'D','L','R','B'},
  627.     {'P','S','Y','1'},
  628.     {'P','S','X','1'},
  629.     {'P','S','Y'},
  630.     {'P','S','X'},
  631.     {'P','S','C'},
  632.     {'P','S','W'},
  633.     }; /* _dpsQ1 */
  634.   _dpsQ _dpsF;    /* local copy  */
  635.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  636.   char pad[3];
  637.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  638.   register int _dps_offset = 160;
  639.   _dpsF = _dpsStat;    /* assign automatic variable */
  640.  
  641.   _dpsP[1].length = i;
  642.   _dpsP[4].length = i;
  643.   _dpsP[7].length = i;
  644.   _dpsP[10].length = i;
  645.   _dpsP[13].length = i;
  646.   _dpsP[16].length = i;
  647.   _dpsP[18].val.integerVal = i;
  648.   _dpsP[16].val.arrayVal = _dps_offset;
  649.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  650.   _dpsP[13].val.arrayVal = _dps_offset;
  651.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  652.   _dpsP[10].val.arrayVal = _dps_offset;
  653.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  654.   _dpsP[7].val.arrayVal = _dps_offset;
  655.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  656.   _dpsP[4].val.arrayVal = _dps_offset;
  657.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  658.   _dpsP[1].val.arrayVal = _dps_offset;
  659.   _dps_offset += i * sizeof(DPSBinObjGeneric);
  660.   _dpsP[19].val.stringVal = _dps_offset;
  661.   _dpsP[15].val.stringVal = _dps_offset + 4;
  662.   _dpsP[12].val.stringVal = _dps_offset + 8;
  663.   _dpsP[9].val.stringVal = _dps_offset + 12;
  664.   _dpsP[6].val.stringVal = _dps_offset + 15;
  665.   _dpsP[3].val.stringVal = _dps_offset + 18;
  666.   _dpsP[0].val.stringVal = _dps_offset + 21;
  667.   _dps_offset += 24;
  668.  
  669.   _dpsF.nBytes = _dps_offset+4;
  670.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,164);
  671.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)Y1, i);
  672.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)X1, i);
  673.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)Y, i);
  674.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)X, i);
  675.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)C, i);
  676.   DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)W, i);
  677.   DPSWriteStringChars(_dpsCurCtxt,(char *) &_dpsF1,24);
  678.   if (0) *pad = 0;    /* quiets compiler warnings */
  679. }
  680. #line 151 "DrawViewWraps.psw"
  681.  
  682.  
  683.  
  684. /***  Called by -drawOptimizedStroke  ***/
  685. /* Places the input args on the stack and calls the MakeLineBind procedure. */
  686. #line 687 "./sym/DrawViewWraps.c"
  687. void PSWMakeLineBind(float X, float Y, float X1, float Y1)
  688. {
  689.   typedef struct {
  690.     unsigned char tokenType;
  691.     unsigned char topLevelCount;
  692.     unsigned short nBytes;
  693.  
  694.     DPSBinObjReal obj0;
  695.     DPSBinObjReal obj1;
  696.     DPSBinObjReal obj2;
  697.     DPSBinObjReal obj3;
  698.     DPSBinObjGeneric obj4;
  699.     char obj5[3];
  700.     } _dpsQ;
  701.   static const _dpsQ _dpsStat = {
  702.     DPS_DEF_TOKENTYPE, 5, 47,
  703.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X1 */
  704.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y1 */
  705.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: X */
  706.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: Y */
  707.     {DPS_EXEC|DPS_NAME, 0, 3, 40},    /* MLB */
  708.     {'M','L','B'},
  709.     }; /* _dpsQ */
  710.   _dpsQ _dpsF;    /* local copy  */
  711.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  712.   char pad[3];
  713.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  714.   _dpsF = _dpsStat;    /* assign automatic variable */
  715.  
  716.   _dpsP[2].val.realVal = X;
  717.   _dpsP[3].val.realVal = Y;
  718.   _dpsP[0].val.realVal = X1;
  719.   _dpsP[1].val.realVal = Y1;
  720.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,47);
  721.   if (0) *pad = 0;    /* quiets compiler warnings */
  722. }
  723. #line 158 "DrawViewWraps.psw"
  724.  
  725.  
  726. /* Places the input args on the stack and calls the StrokeLineBind procedure. */
  727. #line 728 "./sym/DrawViewWraps.c"
  728. void PSWStrokeLineBind(float LineWidth, float LineColor)
  729. {
  730.   typedef struct {
  731.     unsigned char tokenType;
  732.     unsigned char topLevelCount;
  733.     unsigned short nBytes;
  734.  
  735.     DPSBinObjReal obj0;
  736.     DPSBinObjReal obj1;
  737.     DPSBinObjGeneric obj2;
  738.     char obj3[3];
  739.     } _dpsQ;
  740.   static const _dpsQ _dpsStat = {
  741.     DPS_DEF_TOKENTYPE, 3, 31,
  742.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineColor */
  743.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: LineWidth */
  744.     {DPS_EXEC|DPS_NAME, 0, 3, 24},    /* SLB */
  745.     {'S','L','B'},
  746.     }; /* _dpsQ */
  747.   _dpsQ _dpsF;    /* local copy  */
  748.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  749.   char pad[3];
  750.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  751.   _dpsF = _dpsStat;    /* assign automatic variable */
  752.  
  753.   _dpsP[1].val.realVal = LineWidth;
  754.   _dpsP[0].val.realVal = LineColor;
  755.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,31);
  756.   if (0) *pad = 0;    /* quiets compiler warnings */
  757. }
  758. #line 163 "DrawViewWraps.psw"
  759.  
  760.  
  761.