Icon Editor Documentation
Filed as: IconEditorDoc.Tioga
Running the Icon Editor:
All the files necessary for running the icon editor may be retrieved using the [Indigo]<Cedar®>Top>IconEditor.DF file. Use the command
IconEditor
to get things started.
How the Icon Editor works:
When the icon editor is started up, the file Sample.icons is automatically read in. You can load in your own file of icons by typing a file name in the "File:" window.
What each command does:
Close, Grow <-->, Destroy, Reset, Save and Load operate in exactly the same way they do in a normal viewer.
RotateDisplay: This rotates the icons on display, including those icons which exist but are not visible on the screen. Currently the limit on icons which can be displayed on the screen is 20. But it is possible to have more than 20 icons in a file. NOTE: "clicking" the RotateDisplay button with the red mouse button will rotate the icons one at a time. "Clicking" with the blue mouse button will rotate the icons four at a time (Useful when you're in a hurry)
DeleteIcon: This deletes the current icon. (The current icon is the one which is displayed on the "Drawing Board")
CreateIcon: This creates a new blank icon at the end of the list of current icons.
ShowLabel: Sketches the boundaries on the label area of the icon. An error message is printed if the icon does not have a label.
The following commands require that a rectangle be marked first. A rectangle can be marked by holding down the yellow mouse button and marking the diagonal of the rectangle.
ShiftUp, ShiftDn, ShiftLf, ShiftRt: Shifts (actually, Rotates) the contents of the rectangle by one or four rows or columns in the desired direction. "Clicking" the Shift buttons with the red mouse button will shift the contents by one; "Clicking" the Shift buttons with the blue mouse button will shift the contents by 4. NOTE: if no rectangle has been marked, it is assumed that the entire icon will be shifted. WARNING: If your icon has a desk-top gray background, do not shift it by any other increment than 4, otherwise the gray pattern will be off.
SetLabel: Stores the coordinates of the rectangle which has been marked as the label for the icon.
InvertLabel: Sets a bit in the internal icon representation which tells the viewers world to invert the text it paints on the icon when it labels the icon. This is useful when you have an icon which has alot of black area and you wish to have the label painted on the black area.
Mirror: Achieves the effect of holding the marked rectangle to a mirror.
White, DeskTopGray, DarkGray, Black: fills in the marked rectangle with the selected color.
InvertColor: Simply inverts the black and white pixels in the marked rectangle.
The following command requires that a line be marked first. The mark a line, hold down the control key and the yellow mouse button and draw the desired line.
DrawLine: Uses a line drawing algorithm to draw the desired line.
UNDO: Undoes the following operations: ShiftUp, ShiftDn, ShiftLf, ShiftRt, Mirror, White, DeskTopGray, DarkGray, Black, InvertColor and DrawLine. UNDO only keeps track of one level of operations, so don't perform a series of operations and expect to get back to where you started from.
FetchIcon: This can be used to retrieve an icon from another icon file or to rearrange the order of the icons in the current file. Before using the Fetch Icon Button, a number must be typed into the number window (Number[0-...]). The ordering of the icons is not always clear (i.e. - which number corresponds to the icon you want.) When the icons are displayed above the drawing board, the icon in the top left corner is #0 and the one to the right of it is #1. When the icons are displayed to the right of the drawing board, again the top left icon is #0, and the one to the right of it is again, #1.
How to use the icons you have created:
Ah yes. When creating the container that you wish your icon to represent, set
container.icon ← Icons.NewIconFromFile[<filename of file containing icons>, index];
Other useful features:
If you have created a 64 x 64 bitmap by some other means (eg - Cedar Graphics) you can edit this bitmap with the icon editor and convert it to normal icon format by calling the procedure
IconEditorDefs.BitMapToCurrentIcon[<ref to bitmap>];
This will create a new icon consisting of the bitmap passed as a parameter and it will make this new icon be the "current icon", that is, the icon on the drawing board ready to be edited.