home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
disks
/
disk377.lzh
/
IE
/
IE.doc
< prev
next >
Wrap
Text File
|
1990-10-10
|
11KB
|
270 lines
***********************************************************
* IE - THE COMPLETE ICON EDITOR (version 2.0) *
***********************************************************
by Peter Kiem
3 Beazley Crescent,
Calwell A.C.T. 2905
DISCLAIMER:
You have the right to freely use, copy and distribute this program
as long as the following conditions are met:
1. The program and documentation are not modified in any way;
2. The program is not used or included in any package for profit
unless written consent from the author is obtained.
NOTE: The author does not accept any responsibility for any damage
that might result from the use of this program.
Please note that this program is now released as SHAREWARE!!!
If you like this program and use it please send a small donation
of around A$10 to support my programming efforts. You will then get a
registered copy of the program and further updates for free.
Registered users can get a copy of the Source Code for A$20.
FROM THE AUTHOR:
Now we have dispensed with all the boring legal stuff, we can now
get down to the interesting stuff:
I am a CSO2 programmer with the Commonwealth Public Service. I
own an Amiga 500 with 3 Meg memory, A590 Hard Drive and an external
floppy drive. The compiler I own is Manx Aztec C version 5.0b.
I wrote IE mainly as an exercise in learning Amiga C, but it
started out with a dissatisfaction with the supplied icon programs
(ICONED and ICONMERGE). I was disgusted with the fact that dual-render
icons (icons that change picture when selected) could only be created by
using ICONED to make two icons and ICONMERGE to join the icons together.
ICONED also did not allow you to edit the dual-render icons so created.
I also have some large icons from off the public domain which were too
large to be edited with ICONED.
I then resolved to create an icon editor with all conceiveable
icon functions with the capability of creating REALLY LARGE dual-render
icons.
I hope that you find this program useful and you include it on
your system as a replacement to ICONED.
FEATURES OF IE:
IE has the following abilities:
- Can create icons up to 640x200 pixels.
- Handles creation and editing of dual-rendered icons.
- Uses scroll bars for ease of moving around icon bitmap.
- Icon preview function allows you to see what your icon will look
like without leaving the program. Any changes made to the icon
bitmap can be seen immediately in the preview.
- Detaches from CLI for background running.
- Able to edit miscellaneous aspects of the icon including the
aspects edited by the WorkBench menu item "INFO"
- Icon Type (DISK/DRAWER/PROJECT/TOOL/GARBAGE)
- Icon Select Highlight (COMPLEMENT/BACKFILL/ALTERNATE PIC)
- Position of Icon (including FIND BEST POSITION)
- Stack Size (for project and tool icons)
- Default Tool (for disk and project icons)
- Definitions of up to 10 Tool Type strings
- Size and placement of opened window (for disk, drawer
and garbage icons).
- Flood fill colouring.
- Iconify to shrink windows.
- Write Icon as C Code so your programs can write their own icons.
(Can also be used to generate C Code for images so you can use IE
to create gadget images and save them as C Code for inclusion in
your programs).
ADDED IN VERSION 1.1
- Key shortcuts to menus.
- Read IFF picture into current icon image.
- Set the colours of the window opened by the icon.
ADDED IN VERSION 1.2
- Write icon as IFF picture to allow the use of more sophisicated
packages' editing (e.g. DPaint).
ADDED IN VERSION 2.0
- Automatically detects how many colours your workbench is running
with and allows the editing/conversion of icons with the
appropiate number of bitplanes (2-3 bitplanes).
CALLING IE:
IE can be run from either the workbench or from the CLI. To run
IE from the CLI the following call is used:
IE [filename]
where filename is an optional parameter which is the icon to load.
NOTE: IT IS NOT NECESSARY TO HAVE THE .INFO IN THE FILENAME. THIS IS
REMOVED BEFORE LOADING THE ICON AS THE SYSTEM ROUTINES DON'T LIKE IT.
When calling IE from the workbench, if you select a PROJECT icon
before activating IE (via SHIFT KEY-DOUBLE CLICK) the icon will be
automatically loaded into IE.
**HINT** To make a library of icons for use, save the icons as PROJECTs
so you can use the above method to automatically load IE with the icon.
The icons can then be changed to the appropiate type and saved to its new
destination. As the icons are projects you can also set the DEFAULT
TOOL to IE (don't forget the path) and then by DOUBLE CLICKING on the
icon, IE will be loaded with the icon.
ICONIFY FUNCTION:
By selecting ICONIFY from the IE menus, all IE windows are closed
and a small window is opened. This allows you to get IE totally out of
the way temporarily. This small window can then be dragged to anywhere
on the screen. To un-iconify IE simply activate the window by clicking
the left mouse button in the window and then click the right mouse
button. All IE windows will the be opened in the same place and size as
before.
PREVIEW WINDOW:
By selecting PREVIEW from the IE menus, a preview window is opened.
This window displays the icon as it will appear on the workbench screen.
By clicking the left mouse button in this window, the icon render images
change simulating the action of selecting the icon.
INFO EDIT WINDOW:
By selecting EDIT INFO from the IE menus, a info-editing window is
opened. This window allows you to change the icon type, icon render,
tool types, default tool and size of opened window amongst other things.
In version 1.1 the ability to change the opened window colours was
added. By clicking in the coloured squares under Title Colour and Border
Colour you can select the colour to use. Title colour is the colour used
to render the text in the window title and Border colour is the
background colour for the window borders.
NOTE: You must reload the window containing the icon to get the new
colours.
CHANGING THE BITMAP:
By clicking the left mouse button in the bitmap display on the left
side of the main window, the selected pixel is changed to the selected
colour. By holding down the left mouse button and dragging the pointer
you can continuously draw in the bitmap.
When the Flood Fill gadget is on, the action of clicking the left
mouse button will change the area colour under the pointer to the
selected colour. It probably is a good idea to save your icon BEFORE
doing a flood fill in case the area you selected wasn't properly bounded
and the flood fill does more than you think. Only horizontal and
vertical connections are checked for flood fill (diagonals are ignored).
DON'T FORGET TO TURN OFF THE FLOOD FILL GADGET WHEN FINISHED!!!
MOVING THE ICON BITMAP:
By selecting the arrow gadgets, the icon image currently being
displayed is moved 1 pixel within the bitmap editing display to allow
for expanding the size of the icon.
GENERATING C CODE:
By selecting OUTPUT C CODE from the IE menus, the icon data is
written to a file of your choice in the C language.
One use of this is for your programs to generate their own icons.
The following example shows how to write an icon to a file. This assumes
you generated the C Code to a file called "c-code" and are generating the
icon "test.info":
#include <exec/types.h>
#include <intuition/intuition.h>
#include <workbench/workbench.h>
#include <functions.h>
#include "c-code";
extern struct IconBase *IconBase;
void main()
{
IconBase = (struct IconBase *)
OpenLibrary("icon.library", LIBRARY_VERSION);
PutDiskObject("test", &Icon);
CloseLibrary(IconBase);
exit();
}
You can also use the generated C Code for any-size, 2 or 3 bit-plane
image.
For example: you can draw the desired gadget pictures for your program
using the IE editor, generate the C Code to a file and use the Image
definitions that were generated for use in your program.
READ IFF PICTURE (version 1.1)
By selecting READ IFF from the IE menus, IFF pictures can then be
read into the icon image you are currently editing. This can even read
DPaint brushes. NOTE: If the picture (or brush) you load does not have
colours that match the workbench colours, your picture will load with the
workbench colours and hence may not appear as it did in the IFF picture.
WRITE IFF PICTURE (version 1.2)
By selecting WRITE IFF from the IE menus, the icon image you are
editing can be written out as an IFF picture. You can then load this IFF
picture into a package (like DPaint) for the more sophisticated editing
controls that those packages offer. The IFF picture written will have
the same colours as did workbench.
EIGHT COLOUR ICONS (version 2.0)
When IE is started it looks at the workbench to find out how many
bitplanes are in operation. If your workbench is running with 3
bitplanes then you will have up to 8 colours available for icons else you
will only have the standard 4 colours.
If you load a 2 bitplane icon while in 3 bitplane mode the icon
will be converted to allow the use of more colours. A requester will be
displayed to inform you if this happens.
If you load a 3 bitplane icon while in 2 bitplane mode the icon
will be converted to use only the 4 standard colours. A requester will
be displayed to inform you if this happens. If the icon is reduced in
colours there may be a change in some of the icons colours due to the
loss of the extra bitplane. This function is useful to fix icons which
look OK in 2 bitplanes but are corrupted in 3 bitplanes.
FINAL NOTE:
The rest of the program I think is quite self explanatory but if
you require any help just contact me and I will help as much as I can.
I really hope that this program is of use to you and if you like it
give it to all of your friends.
Best wishes and happy Iconing...