home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 011.lha / Draw / Vdraw.doc < prev    next >
Text File  |  1986-11-10  |  25KB  |  467 lines

  1. ******  Vdraw 1.08    7-Aug-1986  ******
  2.  
  3. ******** New Stuff (since 1.03) *************
  4.  
  5. - Can now change the screen resolution via vdraw.profile
  6.   - 640 wide always
  7.   - 2, 4, or 8 colours
  8.   - 200 or 400 lines
  9. - Now asks for file names in special input windows
  10. - Added a high speed magnifing glass for precise alignment
  11. - Added printing modes 2:1, 3:1, 4:1, 5:1
  12. - Added poster size printing
  13. - Ghosted non-implemented menu items
  14. - Command keys for main functions
  15. - Fixed bugs in text placement
  16. - added 1.2 Kickstart support
  17. - New area fill uses MUCH LESS memory
  18. - Grid pattern for alignment of objects
  19.  
  20. This is a public domain screen drawing program, you may copy it without
  21. guilt but if you use it much, and especially if you want it to improve,
  22. please send me $15.00 and I will register you as a user and inform you when
  23. new versions become available.  My address is:
  24.  
  25.                Stephen Vermeulen
  26.                3635 Utah Dr., N.W.,
  27.                Calgary, Alberta,
  28.                CANADA, T2N 4A6
  29.  
  30. My phone is:  (403)-282-7990, best time to call is 16:00 - 23:00.
  31.  
  32. Registered users will also get a photocopy of a more detailled manual when it
  33. becomes available.  And if you want to receive updates of the program as
  34. soon as they become available (and you are a registered user) send me a
  35. blank disk and $1.50 and I will mail the update to you as soon as it becomes
  36. available.  You can include a note as to how much upgrading you wish to see
  37. in the new version, for example "wait for a major new feature like 'line'",
  38. "wait for a new plotter driver", "when you have done 30 hours of changes",
  39. etc.
  40.  
  41. Also if you are a registered user, feel free to send me your comments and
  42. suggestions!
  43.  
  44. Vdraw now supports super bit map scrolling of the drawing window.  The
  45. actual size of the super bit map is defined in the vdraw.profile file that
  46. should be located within your S: logical device.  To setup the default
  47. vdraw.profile type:
  48.  
  49.  copy xxx:vdraw.profile s:
  50.  
  51. where xxx: is the name of the device which the vdraw program is on (probably
  52. either df0: or df1:).  The vdraw.profile file contains the following data:
  53.  
  54. 2.277
  55. 704 300
  56. 10 10 0
  57. 7 -11
  58. 50000
  59. 200 1
  60.  
  61. The first number "2.277" is the aspect ratio for your screen, this is used
  62. to scale the drawing of circles so that they appear round.  To calculate
  63. this use the formula:
  64.  
  65.     (measured height of the screen)                  640
  66.     ------------------------------- x ------------------------------
  67.                 200                   (measured width of the screen)
  68.  
  69. The next two numbers are the width and height of the super bit map to use.
  70. If you have a 2Meg Amiga (lucky you!) you can make these as large as 1000
  71. by 750, (maybe even larger), if you are calculating how much memory is going
  72. to be used by the super bit map you have three planes rather than the two
  73. you might expect because of the TempRas needed by the Flood area filler.
  74. The next two numbers are the coordinates of the top left corner of the
  75. drawing window on the screen, note because of a bug in Intuition (I think)
  76. you cannot drag a superbitmap window around without loosing data from it,
  77. because of this I have turned the draging off for this release, I hope
  78. version 1.2 of the Kickstart disk fixes this.  I have tested vdraw with
  79. 1.2 Beta 2 release of kickstart and it appears that this bug has been
  80. fixed, so what I have done is given you a flag (the third number on this
  81. line) that allows you to disable/enable dragging of the drawing window
  82. depending on whether you have 1.1 or 1.2.  To disable dragging set this
  83. to a zero (0) while to enable dragging set this to one (1). 
  84. The next two numbers specify the initial size for arrowheads, the second
  85. number being negative is a result of the Amiga's reversed Y axis coordinate
  86. system.  The next number in the file is the time (in microseconds) between
  87. refreshes of the lens window.  To make the lens window respond more 
  88. quickly to things you are doing in the main window you reduce this value,
  89. to slow the lens' response (and speed up the main program) you increase
  90. this number. The maximum value is 999999 and the minimum value is probably
  91. around 20000. (The lens is the little untitled window that shows a 
  92. magnified view (black and white only) of the pixels near the mouse
  93. pointer.  The last two numbers are the vertical screen resolution to use
  94. (either 200 or 400 lines) and the number of bit planes to allocate for 
  95. colours (1, 2, or 3 bit planes corresponding to 2, 4, or 8 colours).
  96.  
  97. Note: the 704 above is a bit special, you must make sure that whatever
  98.       number you pick is exactly divisible by 16.  ( ie 704 = 16x44 )
  99.  
  100. How to compute the memory used for bit map data by Vdraw:
  101.  
  102.                      number of planes * width * height
  103.    number of bytes = ---------------------------------
  104.                                      8
  105.  
  106.    (Note: for a workbench screen (4 colours) number of planes = 2
  107.           and Vdraw 1.06+ has its own area filling routine and thus
  108.           does not need an extra bit plane for temporary Flood() 
  109.           routine use.  Older Vdraws and some commercial drawing
  110.           programs use an extra plane which wastes memory. )
  111.  
  112.  
  113.                          --------  VDRAW  --------
  114.  
  115. Vdraw is menu driven and easy to use.  To start you select a pen colour from
  116. the Graphics menu.  Then you select a drawing mode from the Draw menu.
  117. The drawing modes that now exist are:
  118.  
  119.                NOTE:  To escape from any function that changes the
  120.                       window's title (ie Sketch, areafill...) just
  121.                       press the menu button.
  122.  
  123.    HOLLOWBOX - Draws a series of hollow boxes.  Press the menu button
  124.                to leave this mode.  The boxes are drawn in the current
  125.                line type as selected in the Graphics menu.
  126.  
  127.    FILLEDBOX - Draws filled boxes.  Uses the currently selected area
  128.                type to do the fills.  Menu  button exits.  Currently does
  129.                not draw a border around the rectangle, this may be added
  130.                in a future release.
  131.  
  132.    SKETCH    - Sketch lines on the screen while the SELECT button is pressed
  133.                press the MENU button to exit.
  134.  
  135.    LINE DRAW - This routine gives you complete, fine control of drawing
  136.                single lines.  You click on the START / END gadget to
  137.                select the end point of the line to be moved.  You then
  138.                either click in the main drawing window or click on one of
  139.                the control window's arrow gadgets to move the selected
  140.                end point of the line.  If you want arrow heads (for
  141.                dimension lines) you may click on the NONE/ONE/TWO gadget,
  142.                clicking cycles through the options of no arrow heads, an
  143.                arrow head on the END point and arrowheads at both ends.
  144.                The HOLLOW/SOLID gadget is provided for a future release
  145.                which will allow HOLLOW (as now) or SOLID arrowheads.
  146.                To change the size/shape of the arrow head, click on the
  147.                A SIZE gadget then click on the 4 arrow gadgets to return
  148.                these to their normal functions click on the A SIZE gadget
  149.                again.  When you are satisfied
  150.                with the appearance of the line press the OK gadget.  To
  151.                finish drawing lines click the CANCEL gadget.
  152.  
  153.                CAUTION: it seems that scrolling the superbitmap much while
  154.                drawing lines can leave junk on the screen, it shouldn't
  155.                but I suspect a bug in Layers or Intuition, any comments?
  156.             
  157.                The above is definintly a bug in 1.1 Kickstart, it has
  158.                been fixed in 1.2!
  159.  
  160.    CIRCLE    - This routine allows versatile drawing of circles.  With
  161.                circles you are either adjusting the RADIUS or are locating
  162.                the CENTER of the circle.  Click on the RADIUS and CENTER
  163.                gadgets to choose which mode you are in.  You can use either
  164.                the arrow gadgets or click directly in the drawing window
  165.                to adjust either the position or radius length.  The MARK
  166.                gadget controls whether the crosshair mark at the center
  167.                of the circle is drawn or not.  Note: to get round circles
  168.                on either the screen or the printer you can play around
  169.                with the aspect ratio (the first number in the 
  170.                vdraw.profile file).  Also note that if a circle is
  171.                round on the screen and you print it with the AUTOSIZED
  172.                printing option it will be round on the printer as well.
  173.  
  174.    ARC-SECTOR -Use this mode to draw circular arcs or pie-pieces (for
  175.                pie charts).  This mode extends the CIRCLE mode by adding
  176.                several gadgets, the ARC and SECTOR gadgets allow you to
  177.                switch between these two modes, and the START and END
  178.                gadgets allow you to adjust the angular sweep of the arc
  179.                or sector.  Again the START and END positions may be
  180.                adjusted either by clicking in the drawing window or by
  181.                pressing one of the arrow gadgets.
  182.  
  183.    AREAFILL  - Move the pointer to the area to be filled and press the
  184.                select button to fill the area.  MENU button exits.  Use
  185.                the Graphics menu to select the fill pattern to be used,
  186.                currently there are 60 patterns, hence the need for two
  187.                Area Types entries.  The area filling is now done by my
  188.                own routine, rather than by a call to the graphics
  189.                library, the reason I did this was that the Flood() 
  190.                command needs an extra bit plane, and that can waste a
  191.                lot of memory!  This routine is slightly slower, but you
  192.                do get to see it work (so you know the system has not
  193.                crashed), and can run out of buffer memory (but will not
  194.                crash if it does so).  I would be interested in hearing
  195.                how much of the fill buffer is actually used (I print
  196.                a message in the dos window to keep you informed of this).
  197.                I could also speed up this routine some what by coding
  198.                a special version of ReadPixel(), but I will have to
  199.                receive a few requests before I try this...
  200.  
  201.    TYPE TEXT - Allows you to enter a string of text, edit it, select
  202.                the drawing mode (JAM1 ...) and style (bold face ...)
  203.                to be used and then position the text exactly on the
  204.                screen.  When positioning the text you may either use
  205.                the arrow gadgets (click once to move one pixel, hold
  206.                down for automatic repeat) or click directly in the
  207.                drawing window.  When the final version of the text
  208.                has been drawn the routine will try and do a carriage
  209.                return line feed to align the next line of text with
  210.                the left edge of the previous text.  Two bugs in moving
  211.                text have been fixed.
  212.  
  213. The GRAPHICS menu has the following topics:
  214.  
  215.   SCREEN     - This item has not been implemented yet, eventually I would
  216.                like to be able to select the graphic resolution that is to
  217.                be used here and then have the system resize everything to
  218.                fit.  Especially useful would be the ability to get the 400
  219.                line interlace mode working from here.  Note: at the moment
  220.                the only way to change the screen resolution is by the 
  221.                values in the vdraw.profile file, but, at least you can
  222.                now do it. 
  223.  
  224.   COLOURS    - This item allows you to select the current drawing pen
  225.                colour.  If you are drawing (especially area filling!) and
  226.                do not see anything go on the screen it is probably because
  227.                you selected the background colour as the pen colour.
  228.  
  229.   CHANGE COLOUR - This item which has not been added yet will let you do
  230.                the RGB mixing of your palate.  For the moment, for 2 and
  231.                4 colour screens you can use preferences.  If anyone has
  232.                code for a RGB mixer (like in preferences) I could include
  233.                it in Vdraw, hint, Hint, HINT...
  234.  
  235.   LINE TYPES - Currently this item lets you select from 16 different line
  236.                patterns, I know they are a bit difficult to read as of yet
  237.                but this is a low priority to change.  If you can think of
  238.                as 16 bit sequence I have missed that would be useful here
  239.                send it to me.
  240.  
  241.   AREA TYPES - Two items here, 1 and 2, because Amiga only supports up to
  242.                31 Sub Items for a given Item in a menu list.  These are the
  243.                lifesize predefined area fill patterns.  There are probably
  244.                some good ones that I have missed (if so let me know).  I
  245.                would also like to add some way of user editing these in a
  246.                future release.
  247.  
  248. There is an EDIT menu, the following functions are supported:
  249.  
  250.   MAGNIFY    - Draw an enlarged view of a 16x12 pixel region on the screen.
  251.                To magnify a different area, point at it and press the
  252.                SELECT button.  A small rectangle shows the area that is
  253.                being magnified.  To change a single pixel, point at it in
  254.                the magnify window and press the SELECT button, each press
  255.                cycles the pixel's colour by one.  To finish magnifing
  256.                close the magnify window.  To scroll the magnified view
  257.                click on the arrow icons in the Magnify window.
  258.  
  259.   CUT        - This option allows you to make a copy of a rectangular area
  260.                in the FREEDRAW WINDOW, the copy appears in the CUT window.
  261.                The CUT window sizes automatically to accept the cut image.
  262.                To return to the main menu press the MENU button.
  263.  
  264.   PASTE      - This option allows you to paste the contents of the CUT
  265.                window anywhere in the FREEDRAW window.  There are four
  266.                modes in which you can do the actual pasting.  When you are
  267.                done press the MENU button.  The two most useful modes are
  268.                overlay (which erases the area underneath the patch being
  269.                pasted) and OR which does a logical OR of the two areas.
  270.                The MERGE does an exclusive or of the areas and the seive
  271.                is really wierd!
  272.  
  273.   INVERSE    - This routine inverts the colours in the selected area.  Press
  274.                the MENU button to exit.
  275.  
  276.   ERASE      - This routine lets you either erase the entire drawing surface
  277.                or enter a special erase box mode which allows you to
  278.                specify (by rubber banding a box) a series of rectangular
  279.                areas on the drawing surface to be erased.
  280.  
  281.   MOVE       - This routine lets you box an area on the screen, cut it out
  282.                (erasing the area where it was) and move it somewhere else.
  283.                The mode which is used to paste down the final copy is one
  284.                of the four modes that the PASTE function supports, the
  285.                normal mode to use is "OR".
  286.  
  287.   GRID       - This menu topic has three subitems, ON, OFF, and PITCH.
  288.                Selecting ON will turn the background alignment grid
  289.                pattern on.  Selecting OFF turns it off.  And selecting
  290.                PITCH will pop up a window asking you to type in a pitch
  291.                to be used.  When this window appears, click on the string
  292.                requester, and type in your desired pitch as two integer
  293.                numbers separated by a space, for example:  "50  50".
  294.                Then, either hit return or click on the OK gadget. 
  295.  
  296. The OPPS menu allows you to select system type operations, these are
  297. relatively bug free, however they are very new.  You can print either
  298. the entire drawing surface (PRINT ALL) or just what is displayed on the
  299. window (PRINT WINDOW).  Either printing may be done as a one to one pixel
  300. dump (in which case the circles get squished) or as a autosized remapping
  301. in which case the aspect ratios stay correct.  Due to a request from one
  302. of the registered users I have added 2:1, 3:1, 4:1, and 5:1 options to
  303. these printing functions, these will double (or tripple, or quadruple...) 
  304. the size of the pixels on the printer, and they break up the printing
  305. into n*n pieces of paper, so that very large posters (40 by 50 inches)
  306. can be produced.  To make this work the best you should set the size of
  307. the super bit map (in vdraw.profile remember?) so that your printer does
  308. its automatic perforation skip at the end of a 1:1 bitmap dump.  On my
  309. Roland PR-1011 (Epson printer driver) I set the super bit map to be
  310. 960 pixels wide by 720 lines high, this exactly fills a full page on the
  311. printer, thus the 4:1 option gives you a poster made of 16 complete 8.5x11
  312. sheets of paper!
  313. Finally you can save your
  314. drawing with SAVE FILE or load a previous effort with LOAD FILE.
  315. There are two submenu topics for these: VDRAW and IFF, select the VDRAW
  316. option to load/save the file is Vdraw bitmap format, the IFF option is
  317. provided for a future release where it will allow loading/saving of files
  318. in the IFF format. These routines do not use the IFF format, this is
  319. because I do not have enough documentation or examples to figure it out
  320. yet (maybe version 1.2?).  Finally I have added an audit file option.  The
  321. purpose behind this is to generate a file of ascii commands that could be
  322. used to drive a plotter or laser printer to create very high quality output.
  323. Since the audit file is a completely ascii format it can be edited with
  324. any text editor, easily transmitted by modem and it might even take less
  325. space than a bit map.
  326. There are four submenu topics for the AUDIT topic.  The first is ON which is
  327. used to open a file for recording commands, it will ask you for a file name
  328. in a special window.  If you plan on using the SKETCH draw mode I would
  329. recomend you specify that the audit file is on the ram disk!  If you only
  330. have a single drive system and you want to use several fonts you MUST put
  331. the audit file on the ram disk because the system can get confused when
  332. trying to load a font and the audit file is open!  The OFF sub menu topic is
  333. used to close the audit file.  You could then open another audit file to
  334. record a new drawing without leaving Vdraw.  The PLAYBACK topic is used to
  335. play an existing audit file back into Vdraw, it will ask for the file name
  336. in a special window.  With this feature is is possible to edit a drawing
  337. by using a text editor to edit an audit file and then PLAYBACK the edited
  338. audit file.  The last submenu topic is the MACRO feature which allows one to
  339. replay an audit file relative to the mouse pointer's position (like the way
  340. the PASTE option works), this feature can be used to create a "parts"
  341. library.  To use it select the MACRO topic, then enter the file name to be
  342. replayed in the special window 
  343. next click in the main drawing window (the first click is wasted currently
  344. to get the mouse propperly in position) next, click wherever you wish a
  345. copy of the part to be drawn.  When you are done press the menu button to
  346. leave this mode.  The LOADCUT and SAVECUT routines have not yet been
  347. implemented, these will allow the loading and saving of the cut window in
  348. iff file format.  The QUIT option is the way out of the program.          
  349.  
  350. The FONTS menu allows you to select the font to be used in subsequent text
  351. commands.  This menu is not fixed, instead it is dynamically built when the
  352. program is run so that all the fonts currently in the system are supported.
  353. Currently a maximum of 100 combinations of font and point size are
  354. supported, this will probably be rewritten in a future release.
  355.  
  356. The CREDITS menu prints the author credits.
  357.  
  358.   The author of Freedraw 0.01 gets credit here because the very original
  359.   version of this was based on Freedraw 0.01, over time the old code has
  360.   been transformed beyond recognition and now, statistically may account
  361.   for up to 0.3% of the source code, if it can be recognized!
  362.  
  363. PLOTTER drivers:
  364.  
  365.   Support for Hewlett Packard XY plotters has been added in the form of
  366. a special file conversion utility that converts from Vdraw audit file
  367. commands to Hewlett Packard's HPGL language.  It also appears that the
  368. Roland plotters may use this command language, but I have not personally
  369. tested this.  It appears that there are at least 3 versions of HPGL in existance
  370. I have used the very earliest two in the writing of the driver.  The first
  371. version supports line drawing and text, the second version adds commands
  372. to draw circles and arcs, and the third version supports some area filling
  373. (of circles, sectors, and rectangles).  As each new version of HPGL includes
  374. all the commands of the previous version the driver will work on any plotter
  375. with any version of HPGL.  The steps to produce a Vdraw drawing on an HPGL
  376. plotter are as follows:
  377.  
  378.   1 - Start Vdraw, open an audit file
  379.  
  380.   2 - Draw your drawing, keep in mind that the plotter driver cannot
  381.       handle such things as paste, erase, magnify ...  The driver only
  382.       has one font, but it does have a variable height and supports
  383.       underlining, bold facing, extended width, and italics.
  384.  
  385.   3 - When you have finished drawing close the audit file and leave Vdraw.
  386.  
  387.   4 - Now you will need to use the "hpout" program to convert the audit
  388.       file commands to an HPGL file.  To use this program you need one
  389.       more file which contains information about the plotter you are using
  390.       an example of this file called "guide" is located in the "plotters"
  391.       directory along with the "hpout" program.  The "guide" file contains
  392.       the following information:
  393.  
  394.         10
  395.         0.035
  396.         500 500
  397.         7220
  398.  
  399.       the first line specifies the magnifing factor to convert from Vdraw
  400.       coordinates to plotter coordinates (this may be a real number, ie.
  401.       you could use something like 5.26), you use this number to set the
  402.       final size of the drawing.  The second line contains the magnifing
  403.       factor for text.  The third line contains the global paper offsets
  404.       in plotter coordinates,  you can use these numbers to shift the plot
  405.       around on the page (no decimals are allowed here).  The fourth number
  406.       contains the plotter's model number, this is used by the driver to
  407.       find out what version of HPGL the plotter understands.  Do not include
  408.       any letters on this line, that is specify 7220 even if you have a
  409.       plotter HP calls a 7220T.  The only two models that are accepted at
  410.       the moment are the 7220 and the 7475,  both of these will use level
  411.       two of HPGL, if you want to use the very primative level of HPGL
  412.       specify a 9872 plotter.  As I did not have full documentation on the
  413.       7475 I was not able to make use of its additional area filling
  414.       commands at this point in time.
  415.  
  416.   5 - To use the hpout program, call it from CLI by "hpout", this way the
  417.       the program will remind you that the actual syntax to use is:
  418.  
  419.         hpout guide auditfile hpglfile
  420.  
  421.       and will cause the program "hpout" to read the plotter information
  422.       file called "guide" and use that information to help convert the
  423.       file "auditfile" containing the Vdraw drawing audit commands into
  424.       a file called "hpglfile" containing the drawing in HPGL format.
  425.  
  426.       NOTE:  any audit commands (such as FILL, CUT, PASTE ...) that the
  427.              plotter cannot handle will be ignored by the hpout program
  428.              and will not appear in the hpglfile.
  429.  
  430.   6 - Finally, (about time you say?) you can draw the drawing on your
  431.       plotter by copying it to the appropriate port (either PAR: or SER:)
  432.       that is:
  433.  
  434.         copy hpglfile PAR:     or    copy hpglfile SER:
  435.  
  436.       I would not try to use PRT: because there is a chance that the special
  437.       reformating that the Amiga's printer driver does might interfere with
  438.       the format of the HPGL plotter commands.
  439.  
  440.   7 - If you need to modify the program "hpout" to support other plotters
  441.       (or even laser printers) the source code is provided in "hpout.c",
  442.       if you do this please send me the modified source code so that I can
  443.       redistribute it.
  444.  
  445. Stephen Vermeulen  7-Aug-1986.
  446.  
  447. UPCOMING ideas:
  448.  
  449.   - saving/loading of the drawing in IFF.H format
  450.   - drafting aids, more area fill patterns.
  451.   - perhaps a CHARTS menu for doing canned graphs, like bar graphs and
  452.     pie charts... ideas??
  453.   - a SCREEN menu to allow you to use a variety of graphics resolutions,
  454.     640x400, 320x200x32  etc.
  455.   - a COLOUR PALATE window to allow you to change the colours.
  456.   - more plotter drivers that would take an audit file as input and create
  457.     an output file suitable for driving various plotting devices such as
  458.     laser printers and XY plotters.  
  459.   - faster moving routine.
  460.   - spray painting, brushing...
  461.  
  462.   - drop me a line if you have any requests.
  463.  
  464.   - Wanted: source code I can add to Vdraw for an RGB colour mixer
  465.             and examples of reading/writing the IFF files!
  466.             (Must be fully public domain!)
  467.