home *** CD-ROM | disk | FTP | other *** search
/ DTP Toolbox / DTPToolbox.iso / utilities / propage_pdraw / donsgenies / docs / pdrawundoccommands.txt < prev    next >
Encoding:
Text File  |  1995-04-19  |  6.2 KB  |  167 lines

  1. This document covers errors and omissions in the Pro Draw ARexx documentation. Compiled by Don Cox.
  2.  
  3. UNDOCUMENTED PRO DRAW AREXX COMMANDS 
  4.  
  5. call FlowText(text, left,top,right, bottom)
  6. Flows text into the defined rectangular area.
  7.  
  8. answer = GetObjText(obj)
  9. Returns the current character, if the current object is a text object. Each character of a text string is a single (compound) object. Carriage return can also be returned as an object.
  10.  
  11. answer = GetTextSize(obj)
  12. Returns width of character and point size.
  13.  
  14. answer = GetTextNext(obj)
  15. Returns distance to next character.
  16.  
  17. answer = GetTextPosn(obj)
  18. Returns x and y coords of bottom left corner of character.
  19.  
  20. Note: useful related commands (documented)
  21. firstcharacter = pdm_GroupFirstObj(obj)
  22. nextcharacter = pdm_GroupNextObj(obj)
  23. lastcharacter = pdm_GroupLastObj(obj)
  24. The characters in a string of text are sequentially numbered objects, and are grouped (unless you have ungrouped them). Pro Draw uses CR ("0d"x) as a line ending, not LF ("0a"x).
  25.  
  26. GetBitmapInfo() and SetBitmapInfo()
  27. GetEPSFinfo() and SetEPSFinfo()
  28. Used as follows:
  29.  
  30. obj = pdm_ClickOnObj()
  31. obsize = pdm_GetObjSize(obj)
  32. if pdm_IsBitmap(obj) = 1 then bitmapinfo = pdm_GetBitmapInfo(obj)
  33. parse var bitmapinfo xpixels "0a"x ypixels "0a"x xoffset "0a"x yoffset "0a"x xscale "0a"x yscale "0a"x degrees "0a"x filename /* degrees doesn't work */
  34. call pdm_SetBitmapInfo(obj,0,0,1,1,0) /* xoffset,yoffset,xscale,yscale,degrees (change of). Scale is based on 75 pixels per inch. This command does NOT alter the bitmap on screen. */
  35.  
  36. IsTransparent() and IsHidden()
  37. These would test if an object is transparent or hidden, but don't appear to work.
  38.  
  39. PlotSmoothRad()
  40. PlotArc()
  41. These draw curves in a similar way to PlotBezier and PlotTurtle. I have not yet worked out the format for the parameters. 
  42.  
  43. CurrentPoint()
  44. A mystery.
  45.  
  46. Dot Matrix printing commands.
  47. All the commands provided for Pro Page also exist in Pro Draw. I have not tested them.
  48.  
  49.  
  50. NOTES ON VARIOUS COMMANDS
  51.  
  52. PageFirstObj()
  53. PageLastObj()
  54. Current page only - do not accept page numbers.
  55.  
  56. GetUserText
  57. "prompts" is in the format "prompt:example". Limited to 20 characters?
  58.  
  59. ClickArea
  60. Returns X and Y coordinates of top left and bottom right corners, not as stated.
  61.  
  62. GetClickPosn
  63. Name of command wrong in manual.
  64.  
  65. CreatePage
  66. Arguments in wrong order: the first argument is the number of the page in front of which new pages are inserted, the second is the number of pages. Thus CreatePage(4,3,) inserts 3 pages in front of page 4, which is renumbered as page 7. To add n new pages after the current page, use this function:
  67.  
  68.  addpages: procedure
  69.     parse arg n, cpage
  70.     newpage = pdm_CreatePage(cpage,n,)
  71.     newpage = pdm_MovePage(newpage+n,newpage)
  72.     cpage = pdm_GoToPage(newpage+n)
  73.     return cpage
  74.  
  75. It is possible to crash Pro Draw by trying to go to page zero.
  76.  
  77. DeletePage
  78. You must delete all the objects on the page first.
  79.  
  80. GetPageName
  81. SetPageName
  82. These do not work. Page names are not implemented in Pro Draw.
  83.  
  84. CompoundObj()
  85. GroupObj()
  86. These will lock up if the object does not exist.
  87.  
  88. MirrorObj([obj],[Ypoint1, Xpoint1, Ypoint2, Xpoint2])
  89. X and Y are in reverse order, not as in manual.
  90.  
  91. Ungroup()
  92. Not UngroupObj() as in manual.
  93.  
  94. SetObjSize
  95. SetObjVisSize
  96. "Size" includes the control handles; "Visible Size" includes only the curves themselves.
  97.  
  98. SetLineWeight
  99. Use 0.00 for "none".
  100.  
  101. SetLineJoin
  102. Usage is SetLineJoin([obj],jointype). Jointypes are 0=mitre, 1=round, 2=bevel, 3=butt, not as stated.
  103.  
  104. SetFillPattern
  105. GetFillPattern
  106. Parameters are in wrong order in manual: angle should come before centerX.
  107.  
  108. GetGridOrder(obj)
  109. Object must be a grid - but
  110.  
  111. IsGrid()
  112. doesn't work. This is probably the worst bug in Pro Draw, as it effectively prevents any ARexx scripts from operating on grids.
  113.  
  114. IsCircle
  115. IsEllipse
  116. Don't distinguish between circles and ellipses. You can get round this with GetObjSize.
  117.  
  118. SetRulerType
  119. 4 is cm, 3 is picas, not as stated.
  120.  
  121. PlotBezier
  122. PlotLine
  123. PlotSmooth
  124. You must call InitPlot before using these commands. The format for the number string is not as stated in the manual. Each point is defined with six numbers, which are separated by spaces. The first two numbers are the X and Y coordinates of the point; the other four are the coordinates of the control handles, and for these the position of the point is taken as zero. The point definitions are separated by commas.
  125. If the point is a corner point, it is not necessary to include four zeros for the relative positions of the control handles. 
  126. You call ClosePlot or EndPlot after using these commands.
  127.  
  128. DrawEllipse
  129. Width, height are radii, not diameters.
  130.  
  131. InitText
  132. All the parameters are optional: "call pdm_InitText()" will produce the standard font requester. The third parameter (setsize) is the aspect ratio of the characters. Bolding works only on some fonts.
  133.  
  134. Text
  135. Should be "call pdm_Text(text, coordX, coordY)", not as stated. Returns X and Y coords of next character. Use InitText before using this or FlowText.
  136.  
  137. SetPSPageSize
  138. Applies to the whole document, not just the current page.
  139.  
  140. PrintDocPS
  141. The sync parameter is not working: the command always returns immediately. This is a serious bug. A possible workaround is to send the drawing to Pro Page and print from there.
  142.  
  143.  
  144. HOW TO DRAW A CURVE
  145. Example:
  146.  
  147. box = pdm_ClickArea("Drag out box to show height of curve")
  148. parse var box cornerX cornerY cornerX2 cornerY2
  149. cornerY2 = strip(cornerY2) /* remove a space */
  150. boxwidth = abs(cornerX2-cornerX)
  151. boxheight = abs(cornerY2-cornerY)
  152. curveleft = cornerX
  153. curvetop = cornerY
  154.  
  155. /* Example data, might be calculated by the program */
  156. curvesizeX = 5.4571 /* Width of curve - this is the width that is to be scaled to fit the box, not necessarily the actual width. e.g. to fit a letter I into a box area you might want to leave some space on each side. */
  157. curvesizeY = 5.1032 /* height of curve */
  158. numstring = "2.8743 0.2727 -0.7719 0.0000 0.9847 0.0000,4.3914 1.0046, 4.3914 2.4817, 1.0911 2.4817, 1.0911 1.0445 0.0000 0.9049 0.4658 -0.4526,2.8743 0.2727 -0.7719 0.0000 0.9847 0.0000" 
  159.  
  160. scaleY = boxheight/curvesizeY
  161. scaleX = scaleY 
  162. /* This keeps aspect from data and ignores shape of box; to get aspect from box, use scaleX = boxwidth/curvesizeX  */
  163. call pdm_initplot(curveleft, curvetop, scaleX, scaleY, 0)
  164. call pdm_PlotBezier(numstring)
  165. obj = pdm_ClosePlot()
  166.  
  167. For more detail see the example genie "DrawRectangle" in the tutorial drawer.