home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / OS2BAS.ZIP / PMORD.BI < prev    next >
Text File  |  1989-08-02  |  25KB  |  935 lines

  1. '**************************************************************
  2. '*
  3. '* Include File: PMOrd.H
  4. '*
  5. '* Requires:     OS2Def.BI (POINTL type)
  6. '*               PMBase.BI (RECTL type)
  7. '*
  8. '* Description:  Types and constants for GOCA orders
  9. '*
  10. '*************************************************************
  11. '*
  12. '* The orders fall into 4 categories :-
  13. '*
  14. '* 1) 1-byte orders    - not possible as BASIC has no single byte numeric
  15. '*
  16. '* 2) 2-byte orders    - second byte contains the value
  17. '*
  18. '* 3) Long orders      - second byte gives the order length, subsequent bytes
  19. '*                       contain the values (up to 256 bytes long)
  20. '*
  21. '* 4) Very long orders - third and fourth bytes gives the order length,
  22. '*                       subsequent bytes contain the values (up to 64K long)
  23. '*
  24. '**************************************************************************
  25.  
  26. '*************************************************************************
  27. '*
  28. '* Miscellaneous structures used in this file
  29. '*
  30. '*************************************************************************
  31.  
  32. ' form of RECTL with shorts instead of longs
  33.  
  34. TYPE RECT1S      ' rcs
  35.     xLeft AS INTEGER
  36.     yBottom AS INTEGER
  37.     xRight AS INTEGER
  38.     yTop AS INTEGER
  39. END TYPE
  40.  
  41. ' form of POINTL with 1 byte offsets instead of longs
  42. TYPE ODPOINT        ' odpt
  43.   dx AS STRING * 1
  44.   dy AS STRING * 1
  45. END TYPE
  46.  
  47. ' form of SIZEL with shorts instead of longs
  48. TYPE SIZES        ' sizs
  49.   cx AS INTEGER
  50.   cy AS INTEGER
  51. END TYPE
  52.  
  53. ' unsigned two-byte swapped integer
  54. TYPE SWPUSHORT        ' swpus
  55.   HiByte AS STRING * 1
  56.   LoByte AS STRING * 1
  57. END TYPE
  58.  
  59. '*************************************************************************
  60. '*
  61. '* 1-byte orders -- can't do in BASIC
  62. '*
  63. '*************************************************************************
  64.  
  65. ' 1-byte order codes
  66. 'CONST OCODEGNOP1    = &H00            ' No-operation
  67. 'CONST OCODEGESD     = &HFF            ' End symbol definition
  68.  
  69. '*************************************************************************
  70. '*
  71. '* 2-byte orders
  72. '*
  73. '*************************************************************************
  74.  
  75. ' definitions to help determine whether an order code is a 2-byte order
  76. CONST OCODE21        = &H80
  77. CONST OCODE22        = &H88
  78.  
  79. ' General 2-byte order structure
  80. TYPE ORDER        ' ord
  81.   idCode AS STRING * 1
  82.   uchData AS STRING * 1
  83. END TYPE
  84.  
  85. ' 2-byte order codes
  86. CONST OCODEGBAR     = &H68          ' Begin area
  87. CONST OCODEGCFIG    = &H7D          ' Close figure
  88. CONST OCODEGEEL     = &H49          ' End element
  89. CONST OCODEGEPTH    = &H7F          ' End path
  90. CONST OCODEGEPROL   = &H3E          ' End prologue
  91. CONST OCODEGPOP     = &H3F          ' Pop
  92. CONST OCODEGSBMX    = &H0D          ' Set background mix
  93. CONST OCODEGPSBMX   = &H4D          ' Push & set b/g mix
  94. CONST OCODEGSCD     = &H3A          ' Set char direction
  95. CONST OCODEGPSCD    = &H7A          ' Push & set char direction
  96. CONST OCODEGSCR     = &H39          ' Set char precision
  97. CONST OCODEGPSCR    = &H79          ' Push & set char precision
  98. CONST OCODEGSCS     = &H38          ' Set char set
  99. CONST OCODEGPSCS    = &H78          ' Push & set char set
  100. CONST OCODEGSCOL    = &H0A          ' Set color
  101. CONST OCODEGPSCOL   = &H4A          ' Push & set color
  102. CONST OCODEGSLE     = &H1A          ' Set line end
  103. CONST OCODEGPSLE    = &H5A          ' Push & set line end
  104. CONST OCODEGSLJ     = &H1B          ' Set line join
  105. CONST OCODEGPSLJ    = &H5B          ' Push & set line join
  106. CONST OCODEGSLT     = &H18          ' Set line type
  107. CONST OCODEGPSLT    = &H58          ' Push & set line type
  108. CONST OCODEGSLW     = &H19          ' Set line width
  109. CONST OCODEGPSLW    = &H59          ' Push & set line width
  110. CONST OCODEGSMP     = &H3B          ' Set marker precision
  111. CONST OCODEGPSMP    = &H7B          ' Push & set marker precision
  112. CONST OCODEGSMS     = &H3C          ' Set marker set
  113. CONST OCODEGPSMS    = &H7C          ' Push & set marker set
  114. CONST OCODEGSMT     = &H29          ' Set marker symbol
  115. CONST OCODEGPSMT    = &H69          ' Push & set marker symbol
  116. CONST OCODEGSMX     = &H0C          ' Set mix
  117. CONST OCODEGPSMX    = &H4C          ' Push & set mix
  118. CONST OCODEGSPS     = &H08          ' Set pattern set
  119. CONST OCODEGPSPS    = &H48          ' Push & set pattern set
  120. CONST OCODEGSPT     = &H28          ' Set pattern symbol
  121. CONST OCODEGPSPT    = &H09          ' Push & set pattern symbol
  122.  
  123. ' constants for 2-byte orders
  124.  
  125. ' Begin area
  126. CONST GBARRESERVED   = &H80
  127. CONST GBARBOUNDARY   = &HC0
  128. CONST GBARNOBOUNDARY = &H80
  129. CONST GBARWINDING    = &HA0
  130. CONST GBARALTERNATE  = &H80
  131.  
  132. ' Set Character Precision
  133. CONST GSCRPRECISION  = &H0F
  134.  
  135. '*************************************************************************
  136. '*
  137. '* Long orders
  138. '*
  139. '*************************************************************************
  140.  
  141. ' definitions to help determine whether an order code is a long order
  142.  
  143. CONST OCODEVLONG    = &HFE
  144.  
  145. ' long order structure
  146. CONST LORDERML = 253
  147.  
  148. TYPE LORDER        ' lord
  149.   idCode AS STRING * 1
  150.   uchLength AS STRING * 1
  151.   uchData AS STRING * LORDERML
  152. END TYPE
  153.  
  154. ' Long orders for which the length of data is normally zero
  155. CONST OCODEGEAR     = &H60          ' End Area
  156. CONST OCODEGEIMG    = &H93          ' End Image
  157.  
  158. ' Long orders for which the data is contained in a type already defined
  159.  
  160. ' Character String
  161. CONST OCODEGCCHST   = &H83          ' char string at curr posn
  162. CONST GCCHSTMC       = 255         ' Max len of string in bytes
  163.  
  164. CONST OCODEGCHST    = &HC3          ' char string at given pos
  165. CONST GCHSTSMC       = 251         ' Max len of string (S)
  166. CONST GCHSTLMC       = 247         ' Max len of string (L)
  167.  
  168. ' Character String Move
  169. CONST OCODEGCCHSTM  = &HB1          ' char string move at c.p.
  170. CONST GCCHSTMMC    = 255         ' Max len of string in byte
  171.  
  172. CONST OCODEGCHSTM   = &HF1          ' char string move at g.p.
  173. CONST GCHSTMSMC    = 251         ' Max len of string (S)
  174. CONST GCHSTMLMC    = 247         ' Max len of string (L)
  175.  
  176. ' Comment
  177. CONST OCODEGCOMT    = &H01          ' Comment
  178. CONST GCOMTML       = 255         ' Maximum len of comment data
  179.  
  180. ' Image
  181. CONST OCODEGIMD     = &H92          ' Image data
  182. CONST GIMDML       = 255         ' Maximum len of image data
  183.  
  184. ' Full Arc
  185. CONST OCODEGCFARC   = &H87          ' full arc at current posn
  186. CONST OCODEGFARC    = &HC7          ' full arc at given posn
  187.  
  188. ' Label
  189. CONST OCODEGLABL    = &HD3          ' Label
  190.  
  191. ' Set Current Position
  192. CONST OCODEGSCP     = &H21          ' Set current position
  193. CONST OCODEGPSCP    = &H61          ' Push and set curr posn
  194.  
  195. ' Bezier spline
  196. CONST OCODEGCBEZ    = &HA5          ' Bezier spline at curr pos
  197. CONST GCBEZSMB       = 21          ' Max number of splines (S)
  198. CONST GCBEZLMB       = 10          ' Max number of splines (L)
  199.  
  200. CONST OCODEGBEZ     = &HE5          ' Bezier spline at given pos
  201. CONST GBEZSMB       = 20          ' Max number of splines (S)
  202. CONST GBEZLMB       = 10          ' Max number of splines (L)
  203.  
  204. ' Fillet
  205. CONST OCODEGCFLT    = &H85          ' fillet at current posn
  206. CONST GCFLTSMP       = 63          ' Max number of points (S)
  207. CONST GCFLTLMP       = 31          ' Max number of points (L)
  208.  
  209. CONST OCODEGFLT     = &HC5          ' fillet at given position
  210. CONST GFLTSMP       = 62          ' Max number of points (S)
  211. CONST GFLTLMP       = 30          ' Max number of points (L)
  212.  
  213. ' Polyline
  214. CONST OCODEGCLINE   = &H81          ' polyline at current posn
  215. CONST GCLINESMP    = 63          ' Max number of points (S)
  216. CONST GCLINELMP    = 31          ' Max number of points (L)
  217.  
  218. CONST OCODEGLINE    = &HC1          ' polyline at given posn
  219. CONST GLINESMP       = 62          ' Max number of points (S)
  220. CONST GLINELMP       = 30          ' Max number of points (L)
  221.  
  222. ' Polymarker
  223. CONST OCODEGCMRK    = &H82          ' marker at current posn
  224. CONST GCMRKSMP       = 63          ' Max number of points (S)
  225. CONST GCMRKLMP       = 31          ' Max number of points (L)
  226.  
  227. CONST OCODEGMRK     = &HC2          ' marker at given posn
  228. CONST GMRKSMP       = 62          ' Max number of points (S)
  229. CONST GMRKLMP       = 30          ' Max number of points (L)
  230.  
  231. ' Relative Line
  232. CONST OCODEGCRLINE  = &HA1          ' Relative line at curr pos
  233. CONST GCRLINEMP    = 127         ' Max number of points
  234.  
  235. CONST OCODEGRLINE   = &HE1          ' Relative line at givn pos
  236. CONST GRLINESMP    = 125         ' Max number of points (S)
  237. CONST GRLINELMP    = 123         ' Max number of points (L)
  238.  
  239. ' Set Background Color
  240. CONST OCODEGSBCOL   = &H25          ' Set background color
  241. CONST OCODEGPSBCOL  = &H65          ' Push and set b/g color
  242.  
  243. ' Set Extended Color
  244. CONST OCODEGSECOL   = &H26          ' Set extended color
  245. CONST OCODEGPSECOL  = &H66          ' Push and set ext color
  246.  
  247. ' Extended Color values
  248. CONST SECOLDEFAULT0  = &H0000
  249. CONST SECOLDEFAULT1  = &HFF00
  250. CONST SECOLNEUTRAL   = &HFF07
  251. CONST SECOLRESET     = &HFF08
  252.  
  253. ' Set Character Angle
  254. CONST OCODEGSCA     = &H34          ' Set character angle
  255. CONST OCODEGPSCA    = &H74          ' Push and set char angle
  256.  
  257. ' Set Character Shear
  258. CONST OCODEGSCH     = &H35          ' Set character shear
  259. CONST OCODEGPSCH    = &H75          ' Push and set char shear
  260.  
  261. ' Set Fractional Line Width
  262. CONST OCODEGSFLW    = &H11          ' Set fractional line width
  263. CONST OCODEGPSFLW   = &H51          ' Push and set frac l width
  264.  
  265. ' Set Pick Identifier
  266. CONST OCODEGSPIK    = &H43          ' Set pick identifier
  267. CONST OCODEGPSPIK   = &H23          ' Push and set pick id
  268.  
  269.  
  270. ' Long Orders for which a structure can be defined for the data
  271.  
  272. ' Arc
  273. CONST OCODEGCARC    = &H86          ' Arc at Current Position
  274. CONST OCODEGARC     = &HC6          ' Arc at Given Position
  275.  
  276. TYPE ORDERSGCARC   ' osgcarc
  277.   ptInter AS POINTS
  278.   ptEnd AS POINTS
  279. END TYPE
  280.  
  281. TYPE ORDERLGCARC   ' olgcarc
  282.   ptInter AS POINTL
  283.   ptEnd AS POINTL
  284. END TYPE
  285.  
  286. ' Begin Element
  287. CONST OCODEGBEL     = &HD2          ' Begin Element
  288.  
  289. CONST GBELDL        = 251
  290. TYPE ORDERGBEL       ' ogbel
  291.   lElementType AS LONG
  292.   segogg AS LONG   ' address of array in C: CHAR achDesc[GBEL_DL]
  293. END TYPE
  294.  
  295. ' Begin Image
  296. CONST OCODEGCBIMG   = &H91          ' Begin Image at curr posn
  297. CONST OCODEGBIMG    = &HD1          ' Begin Image at given posn
  298.  
  299. TYPE ORDERGCBIMG   ' ogbimg
  300.   uchFormat AS STRING * 1
  301.   uchReserved AS STRING * 1
  302.   cx AS SWPUSHORT
  303.   cy AS SWPUSHORT
  304. END TYPE
  305.  
  306. ' Begin Path
  307. CONST OCODEGBPTH    = &HD0          ' Begin Path
  308.  
  309. TYPE ORDERGBPTH    ' ogbpth
  310.   usReserved AS INTEGER
  311.   idPath AS LONG
  312. END TYPE
  313.  
  314. ' Box
  315. CONST OCODEGCBOX    = &H80          ' Box at current position
  316. CONST OCODEGBOX     = &HC0          ' Box at given position
  317.  
  318. TYPE ORDERSGCBOX   ' osgcbox
  319.   fbFlags AS STRING * 1
  320.   uchReserved AS STRING * 1
  321.   ptCorner AS POINTS
  322.   hAxis AS INTEGER
  323.   vAxis AS INTEGER
  324. END TYPE
  325.  
  326. TYPE ORDERLGCBOX   ' olgcbox
  327.   fbFlags AS STRING * 1
  328.   uchReserved AS STRING * 1
  329.   ptCorner AS POINTL
  330.   hAxis AS LONG
  331.   vAxis AS LONG
  332. END TYPE
  333.  
  334. CONST GCBOXFILL     = &H40
  335. CONST GCBOXBOUNDARY = &H20
  336.  
  337. ' Call Segment
  338. CONST OCODEGCALLS   = &H07          ' call segment
  339.  
  340. TYPE ORDERGCALLS   ' ogcalls
  341.   sReserved AS INTEGER
  342.   idSegment AS LONG
  343. END TYPE
  344.  
  345. ' Fill Path
  346. CONST OCODEGFPTH    = &HD7          ' Fill path
  347. TYPE ORDERGFPTH   ' ogfpth
  348.   fbFlags AS STRING * 1
  349.   uchReserved AS STRING * 1
  350.   idPath AS LONG
  351. END TYPE
  352.  
  353. CONST GFPTHALTERNATE = &H00
  354. CONST GFPTHWINDING   = &H40
  355. CONST GFPTHMODIFY    = &H20
  356.  
  357. ' Modify Path
  358. CONST OCODEGMPTH = &HD8           ' modify path
  359.  
  360. TYPE ORDERGMPTH    ' ogmpth
  361.   uchMode AS STRING * 1
  362.   uchReserved AS STRING * 1
  363.   idPath AS LONG
  364. END TYPE
  365.  
  366. CONST GMPTHSTROKE    = &H06
  367.  
  368. ' Partial Arc
  369. CONST OCODEGCPARC   = &HA3          ' Partial arc at curr posn
  370. CONST OCODEGPARC    = &HE3          ' Partial arc at given posn
  371.  
  372. TYPE ORDERSGCPARC  ' osgcparc
  373.   ptCenter AS POINTS
  374.   ufx88Multiplier AS INTEGER
  375.   usStartAngle AS LONG
  376.   usSweepAngle AS LONG
  377. END TYPE
  378.  
  379. TYPE ORDERLGCPARC  ' olgcparc
  380.   ptCenter AS POINTL
  381.   ufxMultiplier AS INTEGER
  382.   usStartAngle AS LONG
  383.   usSweepAngle AS LONG
  384. END TYPE
  385.  
  386. ' Set Clip Path
  387. CONST OCODEGSCPTH   = &HB4          ' Set clip path
  388.  
  389. TYPE ORDERGSCPTH   ' ogscpth
  390.   fbFlags AS STRING * 1
  391.   uchReserved AS STRING * 1
  392.   idPath AS LONG
  393. END TYPE
  394.  
  395. CONST GSCPTHALTERNATE = &H00
  396. CONST GSCPTHWINDING   = &H40
  397. CONST GSCPTHRESET     = &H00
  398. CONST GSCPTHINTERSECT = &H20
  399.  
  400. ' Set Arc Parameters
  401. CONST OCODEGSAP     = &H22          ' Set arc parameters
  402. CONST OCODEGPSAP    = &H62          ' Push and set arc params
  403.  
  404. TYPE ORDERSGSAP    ' osgsap
  405.   p AS INTEGER
  406.   q AS INTEGER
  407.   r AS INTEGER
  408.   s AS INTEGER
  409. END TYPE
  410.  
  411. TYPE ORDERLGSAP    ' olgsap
  412.   p AS LONG
  413.   q AS LONG
  414.   r AS LONG
  415.   s AS LONG
  416. END TYPE
  417.  
  418. ' Set Background Indexed Color
  419. CONST OCODEGSBICOL  = &HA7          ' Set b/g indexed color
  420. CONST OCODEGPSBICOL = &HE7          ' Push and set b/g ind color
  421. CONST OCODEGSICOL   = &HA6          ' Set indexed color
  422. CONST OCODEGPSICOL  = &HE6          ' Push and set indexd color
  423.  
  424. TYPE ORDERGSBICOL  ' ogbicol
  425.   fbFlags AS STRING * 1
  426.   auchColor AS STRING * 3
  427. END TYPE
  428.  
  429. CONST SICOLSPECIFY  = &H00
  430. CONST SICOLSPECIAL  = &H40
  431. CONST SICOLDEFAULT  = &H80
  432. CONST SICOLBLACK   = 1
  433. CONST SICOLWHITE   = 2
  434. CONST SICOLONES    = 4
  435. CONST SICOLZEROES  = 5
  436.  
  437. ' Set Character Cell
  438. CONST OCODEGSCC     = &H33          ' Set character cell
  439. CONST OCODEGPSCC    = &H03          ' Push and set char cell
  440.  
  441. TYPE ORDERSGSCC    ' osgscc
  442.   cxInt AS INTEGER
  443.   cyInt AS INTEGER
  444.   cxFract AS INTEGER
  445.   cyFract AS INTEGER
  446.   fbFlags AS STRING * 1
  447.   uchReserved AS STRING * 1
  448. END TYPE
  449.  
  450. TYPE ORDERLGSCC    ' olgscc
  451.   cxInt AS LONG
  452.   cyInt AS LONG
  453.   cxFract AS INTEGER
  454.   cyFract AS INTEGER
  455.   fbFlags AS STRING * 1
  456.   uchReserved AS STRING * 1
  457. END TYPE
  458.  
  459. CONST GSCCZERODEF   = &H00
  460. CONST GSCCZEROZERO  = &H80
  461.  
  462. ' Set Marker Cell
  463. CONST OCODEGSMC     = &H37          ' Set marker cell
  464. CONST OCODEGPSMC    = &H77          ' Push and set marker cell
  465.  
  466. TYPE ORDERSGSMC    ' osgsmc
  467.   cx AS INTEGER
  468.   cy AS INTEGER
  469.   fbFlags AS STRING * 1
  470.   uchReserved AS STRING * 1
  471. END TYPE
  472.  
  473. TYPE ORDERLGSMC    ' olgsmc
  474.   cx AS LONG
  475.   cy AS LONG
  476.   fbFlags AS STRING * 1
  477.   uchReserved AS STRING * 1
  478. END TYPE
  479.  
  480. CONST GSMCZERODEF   = &H00
  481. CONST GSMCZEROZERO  = &H80
  482.  
  483. ' Set Pattern Reference Point
  484. CONST OCODEGSPRP    = &HA0          ' Set pattern ref point
  485. CONST OCODEGPSPRP   = &HE0          ' Push and set patt ref pt
  486.  
  487. TYPE ORDERSGSPRP   ' osgsprp
  488.   fbFlags AS STRING * 1
  489.   uchReserved AS STRING * 1
  490.   ptPos AS POINTS
  491. END TYPE
  492.  
  493. TYPE ORDERLGSPRP   ' olgsprp
  494.   fbFlags AS STRING * 1
  495.   uchReserved AS STRING * 1
  496.   ptPos AS POINTL
  497. END TYPE
  498.  
  499. CONST GSPRPDEFAULT  = &H80
  500. CONST GSPRPSPECIFY  = &H00
  501.  
  502.  
  503. ' Set Individual Attribute
  504. CONST OCODEGSIA     = &H14          ' Set individual attribute
  505. CONST OCODEGPSIA    = &H54          ' Push and set ind attr
  506.  
  507. CONST GSIAVL = 3
  508. TYPE ORDERGSIA       ' ogsia
  509.   uchAttrType AS STRING * 1
  510.   uchPrimType AS STRING * 1
  511.   fbFlags AS STRING * 1
  512.   auchValue AS STRING * GSIAVL
  513. END TYPE
  514.  
  515. CONST GSIACOLOR     = &H01
  516. CONST GSIABCOLOR    = &H02
  517. CONST GSIAMIX        = &H03
  518. CONST GSIABMIX        = &H04
  519. CONST GSIALINE        = &H01
  520. CONST GSIACHAR        = &H02
  521. CONST GSIAMARKER    = &H03
  522. CONST GSIAPATTERN   = &H04
  523. CONST GSIAIMAGE     = &H05
  524. CONST GSIASPECIFY   = &H00
  525. CONST GSIASPECIAL   = &H40
  526. CONST GSIADEFAULT   = &H80
  527. CONST GSIABLACK   =  1
  528. CONST GSIAWHITE   =  2
  529. CONST GSIAONES      =  4
  530. CONST GSIAZEROES  =  5
  531.  
  532.  
  533. ' Set Model /Viewing Transform
  534. CONST OCODEGSTM     = &H24          ' Set model transform
  535. CONST OCODEGPSTM    = &H64          ' Push and set model tfm
  536.  
  537. CONST OCODEGSTV     = &H31          ' Set Viewing Transform
  538.  
  539. CONST GSTMML      =  16
  540. TYPE ORDERSGSTM     ' osgstm
  541.   uchReserved AS STRING * 1
  542.   fbFlags AS STRING * 1
  543.   fsMask AS INTEGER
  544.   asMatrix0  AS INTEGER             ' Array in C
  545.   asMatrix1  AS INTEGER
  546.   asMatrix2  AS INTEGER
  547.   asMatrix3  AS INTEGER
  548.   asMatrix4  AS INTEGER
  549.   asMatrix5  AS INTEGER
  550.   asMatrix6  AS INTEGER
  551.   asMatrix7  AS INTEGER
  552.   asMatrix8  AS INTEGER
  553.   asMatrix9  AS INTEGER
  554.   asMatrix10 AS INTEGER
  555.   asMatrix11 AS INTEGER
  556.   asMatrix12 AS INTEGER
  557.   asMatrix13 AS INTEGER
  558.   asMatrix14 AS INTEGER
  559.   asMatrix15 AS INTEGER
  560. END TYPE
  561.  
  562. TYPE ORDERLGSTM     ' olgstm
  563.   uchReserved AS STRING * 1
  564.   fbFlags AS STRING * 1
  565.   fsMask AS INTEGER
  566.   alMatrix0  AS LONG             ' Array in C
  567.   alMatrix1  AS LONG
  568.   alMatrix2  AS LONG
  569.   alMatrix3  AS LONG
  570.   alMatrix4  AS LONG
  571.   alMatrix5  AS LONG
  572.   alMatrix6  AS LONG
  573.   alMatrix7  AS LONG
  574.   alMatrix8  AS LONG
  575.   alMatrix9  AS LONG
  576.   alMatrix10 AS LONG
  577.   alMatrix11 AS LONG
  578.   alMatrix12 AS LONG
  579.   alMatrix13 AS LONG
  580.   alMatrix14 AS LONG
  581.   alMatrix15 AS LONG
  582. END TYPE
  583.  
  584. CONST GSTMM11      = &H8000
  585. CONST GSTMM12      = &H4000
  586. CONST GSTMM13      = &H2000
  587. CONST GSTMM14      = &H1000
  588. CONST GSTMM21      = &H0800
  589. CONST GSTMM22      = &H0400
  590. CONST GSTMM23      = &H0200
  591. CONST GSTMM24      = &H0100
  592. CONST GSTMM31      = &H0080
  593. CONST GSTMM32      = &H0040
  594. CONST GSTMM33      = &H0020
  595. CONST GSTMM34      = &H0010
  596. CONST GSTMM41      = &H0008
  597. CONST GSTMM42      = &H0004
  598. CONST GSTMM43      = &H0002
  599. CONST GSTMM44      = &H0001
  600.  
  601. CONST GSTMUNITY     = &H00
  602. CONST GSTMAFTER     = &H01
  603. CONST GSTMBEFORE    = &H02
  604. CONST GSTMOVERWRITE = &H03
  605.  
  606. CONST GSTVOVERWRITE = &H00
  607. CONST GSTVAFTER     = &H04
  608.  
  609. ' Set Segment Boundary, Viewing Window
  610.  
  611. CONST OCODEGSSB     = &H32          ' Set segment boundary
  612. CONST OCODEGSVW     = &H27          ' Set viewing window
  613. CONST OCODEGPSVW    = &H67          ' Push and set view window
  614.  
  615. CONST GSSBML      =  4
  616. TYPE ORDERSGSSB    ' osgssb
  617.   fbFlags AS STRING * 1
  618.   fbMask AS STRING * 1
  619.   alMatrix0 AS INTEGER
  620.   alMatrix1 AS INTEGER
  621.   alMatrix2 AS INTEGER
  622.   alMatrix3 AS INTEGER
  623. END TYPE
  624.  
  625. TYPE ORDERLGSSB    ' olgssb
  626.   fbFLags AS STRING * 1
  627.   fbMask AS STRING * 1
  628.   alMatrix0 AS LONG
  629.   alMatrix1 AS LONG
  630.   alMatrix2 AS LONG
  631.   alMatrix3 AS LONG
  632. END TYPE
  633.  
  634. CONST GSSBXLEFT     = &H20
  635. CONST GSSBXRIGHT    = &H10
  636. CONST GSSBYBOTTOM   = &H08
  637. CONST GSSBYTOP        = &H04
  638.  
  639. CONST GSVWINTERSECT = &H00
  640. CONST GSVWREPLACE   = &H80
  641.  
  642. ' Set Segment Characteristics
  643. CONST OCODEGSGCH    = &H04          ' Set segment characterstc   s
  644.  
  645. CONST GSGCHML  =     254
  646. TYPE ORDERGSGCH    ' ogsgch
  647.   uchIdent AS STRING * 1
  648.   auchData AS STRING * GSGCHML
  649. END TYPE
  650.  
  651. ' Set Stroke Line Width
  652. CONST OCODEGSSLW    = &H15          ' Set stroke line width
  653. CONST OCODEGPSSLW   = &H55          ' Push and set strk l width
  654.  
  655. TYPE ORDERSGSSLW   ' osgsslw
  656.   fbFlags AS STRING * 1
  657.   uchReserved AS STRING * 1
  658.   LineWidth AS INTEGER
  659. END TYPE
  660.  
  661. TYPE ORDERLGSSLW   ' olgsslw
  662.   fbFlags AS STRING * 1
  663.   uchReserved AS STRING * 1
  664.   LineWidth AS LONG
  665. END TYPE
  666.  
  667. CONST GSSLWDEFAULT  = &H80
  668. CONST GSSLWSPECIFY  = &H00
  669.  
  670. ' Sharp Fillet at Current Position
  671. CONST OCODEGCSFLT   = &HA4          ' Sharp fillet at curr pos
  672. CONST OCODEGSFLT    = &HE4          ' Sharp fillet at given pos
  673.  
  674. CONST GCSFLTSMF =    21
  675. CONST GSFLTSMF    =    20
  676.  
  677. TYPE ORDERSGCSFLT  ' osgcsflt
  678.   apt0  AS POINTS             ' Array in C
  679.   apt1  AS POINTS
  680.   apt2  AS POINTS
  681.   apt3  AS POINTS
  682.   apt4  AS POINTS
  683.   apt5  AS POINTS
  684.   apt6  AS POINTS
  685.   apt7  AS POINTS
  686.   apt8  AS POINTS
  687.   apt9  AS POINTS
  688.   apt10 AS POINTS
  689.   apt11 AS POINTS
  690.   apt12 AS POINTS
  691.   apt13 AS POINTS
  692.   apt14 AS POINTS
  693.   apt15 AS POINTS
  694.   apt16 AS POINTS
  695.   apt17 AS POINTS
  696.   apt18 AS POINTS
  697.   apt19 AS POINTS
  698.   apt20 AS POINTS
  699.   apt21 AS POINTS
  700.   apt22 AS POINTS
  701.   apt23 AS POINTS
  702.   apt24 AS POINTS
  703.   apt25 AS POINTS
  704.   apt26 AS POINTS
  705.   apt27 AS POINTS
  706.   apt28 AS POINTS
  707.   apt29 AS POINTS
  708.   apt30 AS POINTS
  709.   apt31 AS POINTS
  710.   apt32 AS POINTS
  711.   apt33 AS POINTS
  712.   apt34 AS POINTS
  713.   apt35 AS POINTS
  714.   apt36 AS POINTS
  715.   apt37 AS POINTS
  716.   apt38 AS POINTS
  717.   apt39 AS POINTS
  718.   afxSharpness0  AS LONG             ' Array in C
  719.   afxSharpness1  AS LONG
  720.   afxSharpness2  AS LONG
  721.   afxSharpness3  AS LONG
  722.   afxSharpness4  AS LONG
  723.   afxSharpness5  AS LONG
  724.   afxSharpness6  AS LONG
  725.   afxSharpness7  AS LONG
  726.   afxSharpness8  AS LONG
  727.   afxSharpness9  AS LONG
  728.   afxSharpness10 AS LONG
  729.   afxSharpness11 AS LONG
  730.   afxSharpness12 AS LONG
  731.   afxSharpness13 AS LONG
  732.   afxSharpness14 AS LONG
  733.   afxSharpness15 AS LONG
  734.   afxSharpness16 AS LONG
  735.   afxSharpness17 AS LONG
  736.   afxSharpness18 AS LONG
  737.   afxSharpness19 AS LONG
  738. END TYPE
  739.  
  740. CONST GCSFLTLMF  =   12
  741. CONST GSFLTLMF     =   12
  742.  
  743. TYPE ORDERLGCSFLT  ' olgcsflt
  744.   apt0  AS POINTL             ' Array in C
  745.   apt1  AS POINTL
  746.   apt2  AS POINTL
  747.   apt3  AS POINTL
  748.   apt4  AS POINTL
  749.   apt5  AS POINTL
  750.   apt6  AS POINTL
  751.   apt7  AS POINTL
  752.   apt8  AS POINTL
  753.   apt9  AS POINTL
  754.   apt10 AS POINTL
  755.   apt11 AS POINTL
  756.   apt12 AS POINTL
  757.   apt13 AS POINTL
  758.   apt14 AS POINTL
  759.   apt15 AS POINTL
  760.   apt16 AS POINTL
  761.   apt17 AS POINTL
  762.   apt18 AS POINTL
  763.   apt19 AS POINTL
  764.   apt20 AS POINTL
  765.   apt21 AS POINTL
  766.   apt22 AS POINTL
  767.   apt23 AS POINTL
  768.   afxSharpness0  AS LONG             ' Array in C
  769.   afxSharpness1  AS LONG
  770.   afxSharpness2  AS LONG
  771.   afxSharpness3  AS LONG
  772.   afxSharpness4  AS LONG
  773.   afxSharpness5  AS LONG
  774.   afxSharpness6  AS LONG
  775.   afxSharpness7  AS LONG
  776.   afxSharpness8  AS LONG
  777.   afxSharpness9  AS LONG
  778.   afxSharpness10 AS LONG
  779.   afxSharpness11 AS LONG
  780. END TYPE
  781.  
  782. ' Bitblt
  783. CONST OCODEGBBLT    = &HD6          ' Bitblt
  784.  
  785. TYPE ORDERSGBBLT    ' osgbblt
  786.   fsFlags AS INTEGER
  787.   usMix AS INTEGER
  788.   hbmSrc AS LONG
  789.   lOptions AS LONG
  790.   rcsTargetRect AS RECT1S
  791.   rclSourceRect AS RECTL
  792. END TYPE
  793.  
  794. TYPE ORDERLGBBLT    ' olgbblt
  795.   fsFlags AS INTEGER
  796.   usMix AS INTEGER
  797.   hbmSrc AS LONG
  798.   lOptions AS LONG
  799.   rclTargetRect AS RECTL
  800.   rclSourceRect AS RECTL
  801. END TYPE
  802.  
  803. ' Escape
  804. CONST OCODEGESCP    = &HD5          ' Escape
  805.  
  806. '
  807. ' * type describes type of escape order, identifier gives the escape
  808. ' * order if the type is registered
  809.  
  810. CONST GESCPML  =     253
  811. TYPE ORDERGESCP    ' ogescp
  812.   uchType AS STRING * 1
  813.   uchIdent AS STRING * 1
  814.   auchData AS STRING * GESCPML ' Escape data
  815. END TYPE
  816.  
  817. CONST GESCPREG        = &H80          ' identifier is registered
  818.  
  819. ' Escape (Bitblt)
  820. CONST GEBBREGID     = &H02          ' uchIdent - Bitblt
  821.  
  822. CONST ETYPEGEBB      = &H000200D5&
  823.  
  824. CONST GEBBLMP  =     29
  825. TYPE ORDERLGEBB    ' olgebb
  826.   fbFlags AS STRING * 1
  827.   usMix AS INTEGER
  828.   cPoints AS STRING * 1
  829.   hbmSrc AS LONG
  830.   lReserved AS LONG
  831.   lOptions AS LONG
  832.   aptPoints0  AS POINTL             ' Array in C
  833.   aptPoints1  AS POINTL
  834.   aptPoints2  AS POINTL
  835.   aptPoints3  AS POINTL
  836.   aptPoints4  AS POINTL
  837.   aptPoints5  AS POINTL
  838.   aptPoints6  AS POINTL
  839.   aptPoints7  AS POINTL
  840.   aptPoints8  AS POINTL
  841.   aptPoints9  AS POINTL
  842.   aptPoints10 AS POINTL
  843.   aptPoints11 AS POINTL
  844.   aptPoints12 AS POINTL
  845.   aptPoints13 AS POINTL
  846.   aptPoints14 AS POINTL
  847.   aptPoints15 AS POINTL
  848.   aptPoints16 AS POINTL
  849.   aptPoints17 AS POINTL
  850.   aptPoints18 AS POINTL
  851.   aptPoints19 AS POINTL
  852.   aptPoints20 AS POINTL
  853.   aptPoints21 AS POINTL
  854.   aptPoints22 AS POINTL
  855.   aptPoints23 AS POINTL
  856.   aptPoints24 AS POINTL
  857.   aptPoints25 AS POINTL
  858.   aptPoints26 AS POINTL
  859.   aptPoints27 AS POINTL
  860.   aptPoints28 AS POINTL
  861. END TYPE
  862.  
  863. ' Escape (Set Pel)
  864. CONST GEPELREGID    = &H01          ' uchIdent - Set Pel
  865.  
  866. CONST ETYPEGEPEL     = &H000100D5&
  867.  
  868. ' Element Types for attribute bundles
  869. CONST ETYPELINEBUNDLE     = &H0000FD01&
  870. CONST ETYPECHARBUNDLE     = &H0000FD02&
  871. CONST ETYPEMARKERBUNDLE  = &H0000FD03&
  872. CONST ETYPEAREABUNDLE     = &H0000FD04&
  873. CONST ETYPEIMAGEBUNDLE     = &H0000FD05&
  874.  
  875. '*************************************************************************
  876. '*
  877. '* Very long orders
  878. '*
  879. '*************************************************************************
  880.  
  881. ' Very long order structure
  882. CONST VORDERML = 65531
  883. TYPE VORDER        ' vord
  884.   idCode AS STRING * 1
  885.   uchQualifier AS STRING * 1
  886.   uchLength AS SWPUSHORT
  887.   uchData AS STRING * VORDERML
  888. END TYPE
  889.  
  890. ' Character String Extended
  891. CONST OCODEQGCCHSTE  = &HB0          ' Qualifier - current posn
  892. CONST OCODEQGCHSTE   = &HF0          ' Qualifier - given position
  893.  
  894. CONST ETYPEGCCHSTE     = &H0000FEB0&
  895. CONST ETYPEGCHSTE     = &H0000FEF0&
  896.  
  897. TYPE ORDERSGCCHSTE  ' osgcchste
  898.   fbFlags AS STRING * 1
  899.   uchReserved AS STRING * 1
  900.   ptRect0 AS POINTS
  901.   ptRect1 AS POINTS
  902.   cchString AS SWPUSHORT
  903.   achString AS STRING * 1
  904.   adx AS INTEGER
  905. END TYPE
  906.  
  907. TYPE ORDERLGCCHSTE  ' olgcchste
  908.   fbFlags AS STRING * 1
  909.   uchReserved AS STRING * 1
  910.   ptRect0 AS POINTL
  911.   ptRect1 AS POINTL
  912.   cchString AS SWPUSHORT
  913.   achString AS STRING * 1
  914.   adx AS LONG
  915. END TYPE
  916.  
  917. CONST GCCHSTEDRAWRECT       = &H80
  918. CONST GCCHSTENORECT       = &H00
  919. CONST GCCHSTECLIP       = &H40
  920. CONST GCCHSTENOCLIP       = &H00
  921. CONST GCCHSTEDEEMPHASIZE   = &H20
  922. CONST GCCHSTENODEEMPHASIZE = &H00
  923. CONST GCCHSTELEAVEPOS       = &H10
  924. CONST GCCHSTEMOVEPOS       = &H00
  925.  
  926. ' Extended Escape
  927. CONST OCODEQGEESCP   = &HD5          ' Qualifier - extended escape
  928.  
  929. CONST GEESCPML     =   65533
  930. TYPE ORDERGEESCP   ' ogeescp
  931.   uchType AS STRING * 1
  932.   uchIdent AS STRING * 1
  933.   auchData AS STRING * GEESCPML
  934. END TYPE
  935.