home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / ICONED10.ZIP / ICONEDIT.DOC next >
Encoding:
Text File  |  1991-11-25  |  5.6 KB  |  129 lines

  1.                           IconEdit V1.0
  2.  
  3.         by William C. Thompson (wct@po.cwru.edu) - 11/91
  4.  
  5.      This icon editor was help make your programs look more
  6. professional by adding an extra artistic element that was before
  7. missing because of the ominous task of drawing the pictures.  This
  8. program makes it all very easy.  You use the editor to create your
  9. icons (variable size), save it to disk, and load it into your
  10. program using the sample program provided below.  You can work on
  11. several icons simultaneously.  Drawing is made easy with intuitive
  12. commands and clicking.  Now that I've put in my plug, let's get
  13. started.
  14.  
  15.      The first thing anyone wants to do with sort of thing is play
  16. before they start anything real, so I am going to walk through the
  17. program step by step.
  18.  
  19.      You can select the foreground color by left-clicking in the
  20. color bar.  The foreground color bar change as you select.  The
  21. background color can be selected by right-clicking.  Now that
  22. you're armed with your colors, you're ready to draw.  Left and
  23. right clicking will color in the blocks of the icon.  Each block
  24. represents one pixel.  Notice that the picture is also being drawn
  25. in the first box of the lower-right hand corner.  This is how the
  26. icon will actually appear on screen.  When you're ready to erase
  27. what you've done and start over, select Clear in the menu to fill
  28. the icon with background color.
  29.  
  30.      Now that you've had a chance to give it a quick test, you
  31. would like to be able to set the size.  Select Set Size in the
  32. menu.  The mouse will disappear, and you will be prompted for the
  33. size of the new icon.  There must be at least two rows (up and
  34. down) and columns (side to side), but no more than fifty of either. 
  35. Illegal entries will be ignored.  Pressing ESC will abort the
  36. selection.
  37.  
  38.      The icon can be easily transformed.  Flip Horizontal will flip
  39. the icon about the horizontal axis.  Flip Vertical will flip it
  40. about the center line.  Rotate Left will rotate the icon once
  41. counter-clockwise, and Rotate Right will rotate the icon clockwise.
  42.  
  43.      Often you would like to change or erase all of the blocks of
  44. a particular color.  Select this color as the foreground color. 
  45. Then select Change Color.  You will then be prompted for the color
  46. to change it to, or you can select Cancel.
  47.  
  48.      Selecting Grid Color will change the color of the grid to the
  49. foreground color.  This is useful if you are drawing in the current
  50. grid color (light gray) or would like to hide the grid.
  51.  
  52.      You should now be familiar with all of the basic tools of
  53. drawing.  Once you have created a masterpiece, you would like to
  54. save it.  Select Save in the menu.  The mouse will disappear and
  55. you will be prompted for the file to save it to.  The file will be
  56. saved in the current directory with an .ICN extension.  A sample
  57. program to read the image into a Pascal program is listed near the
  58. end of this document.
  59.  
  60.      The nine boxes (slots) in the lower-right hand corner store
  61. icons that may be worked on at once.  Simply select one of the
  62. boxes to make that your working slot.  The current slot is
  63. indicated by a yellow rectangle surrounding the slot.  The Copy
  64. option allows you to copy the icon to another slot.
  65.  
  66.      Select Load to load an icon from disk.  If nothing happens,
  67. either the file does not exist in the current directory, or it was
  68. unable to be accessed.  The icon will be loaded into the current
  69. slot, wiping out everything there, so make sure you select a slot
  70. with nothing important in it.
  71.  
  72.      Transformations can also be performed on sections of an icon. 
  73. Position the mouse to where you want to start selecting a section. 
  74. Click both buttons at once to mark the first corner.  You will be
  75. prompted to select the second corner.  You can escape the entire
  76. process at any time be selecting Cancel.  Position the mouse and
  77. double-click again to set the second corner.  A box will formed
  78. around the selected section.  Clear will fill the section with the
  79. background color.  You can also flip it horizontally and vertical. 
  80. If the section is square, it can be rotated left and right as well. 
  81. You can move or copy the section to another place in the icon. 
  82. These require a somewhat more lengthy explanation.
  83.  
  84.      For each selection, you will be prompted to provide the upper-
  85. left hand corner of the destination.  The destination must allow
  86. enough space for the size of the selection.  When you move a
  87. section, it fills where the section used to be with the background
  88. color.  For moving or copying, squares in section with the
  89. background color are ignored.  This means that any block that is
  90. the background color will not overwrite any block in the
  91. destination.
  92.  
  93.      This should be all you will need to create your icons, now you
  94. need to read them into a program.
  95.  
  96. program readicon;
  97. uses 
  98.   graph;
  99. var
  100.   gd,gm: integer;
  101.   f: file;
  102.   image: pointer;
  103.   size: word;
  104. begin
  105.   gd:=detect;
  106.   initgraph(gd,gm,<graphics path>);
  107.   assign(f,<icon file>);
  108.   reset(f,1);
  109.   size:=filesize(f);           { gets size of image }
  110.   getmem(image,size);          { allocates memory }
  111.   blockread(f,image^,size);    { reads Size bytes from file }
  112.   close(f);
  113.   putimage(<x-coor>,<y-coor>,image^,copyput);
  114.   readln;
  115.   closegraph;
  116. end.
  117.  
  118.  
  119.      All source code (well-documented) is available for $20.  I
  120. would even be willing to make slight modifications for a humble
  121. fee.  Send all inquiries and requests to:
  122.  
  123. William C. Thompson
  124. 11896 Carlton Rd. Box 620
  125. Cleveland, OH 44106
  126.  
  127. I can be reached via E-mail at wct@po.cwru.edu.  If you prefer more
  128. primitive means of communication, I can be reached by phone at
  129. (216) 754-2080, but be prepared to leave a message. :)