FXBitmapEditor 1.03 (27.04.2008)

changes:

COPY and PASTE
In edit-box-mode it is possible to COPY (C) the edit-box into a clipboard.
In normal mode you can paste (N) the clipbord into the current bitmap.

system-symbol-browser:
In the 8x8 mode the keys + and - can be used to browse the FX-intrinsic symbols (about 700 samples). The internal number of the actually displayed FKey-icon is displayed below the bitmap.

Empty icons and symbols are skipped now.

EXP can be used to change the stepwidth when browsing icons and symbols.

------------------------------

The program is designed for FX-9860G. 
Originally it has been programmed to draw 21x8 b/w-bitmaps on-calc, which are used on FX-9860G to display function-key-icons.
Then it has been extended to 8x8- and 16x16-bitmaps for MLC (4 colors and a transparency attribute). Of course the 8x8- and 16x16-bitmap defines can be used in C-sources, too.

Capabilities:

With FXBitmapEditor it is possible to edit 8x8 (b/w or MLC:4+1 color), 16x16 (b/w or MLC:4+1 color) and 21x8 (b/w) bitmaps.

User interface:

FXBitmapEditor starts in 8x8 bit (MLC:4+1 color) mode.

On the left side there is the bitmap edit panel. Its appearance depends on the edit mode chosen.

8x8- and 16x16-mode both use 4x4 bitmaps to display the zoomed single bits. The colors are emulated by dithering.
21x8-mode uses 3x3 bitmaps to display the zoomed single bits.

On the right side in the first line the actual bitmap edit cursor position and the actually selected color are displayed.

The area below these items shows the bitmap in real size. 
In case of the 4-color bitmaps, LtGray-, DkGray- and transparent-buffer are displayed separately. 
In case of the 21x8 bitmap only one real size bitmap is displayed.

UP-, DOWN-, RIGHT- and LEFT-keys move the bitmap edit cursor in the actually allowed range. 
Trying to move past a border wraps the cursor to the opposite side.

F4 selects the bitmap type (8x8, 16x16, 21x8). The F4-key-description shows the actually selected bitmap type.

F5 selects line- or dot-mode. The F5-key-description shows the actually selected drawing mode.
In line-mode the actually selected color is used to draw permanently.
In dot-mode the actually selected color is used to set a single dot when hitting F6.

F6 is only active in dot-mode and sets a single dot.

The keys 0..4 select the color to use. 0 white, 1 black, 2 LtGray, 3 DkGray, 4 transparent;
In 21x8-mode only black and white are possible to select.

S(ave) saves the current bitmap. A filename is queried. The filename defaults to the recently used one. 
If you hit EXE the save will be performed. If you hit EXIT the operation is cancelled.
UP- and DOWN scroll through available files.

The program stores the bitmap in a .RAW file in any case. 
It is the storage format, the program uses internally to reproduce several program settings when continuing an edit later on. 
If you specify the extension RAW or no extension at all, only the RAW-file will be written. 
If you specify the extension MLC, an additional textfile is generated with a MLC-source bitmap definition of the edited bitmap using the filename as bitmap-name. If you specify the extension C, an additional textfile is generated with a C-#define-statement representing the edited bitmap as char array const which name will be derived from the filename, too.
In any case the bitmaps are stored in the order LtGray-, DkGray-, transparent-buffer, each line by line.

If you specify the extension G1M, a BASIC-program which will display the bitmap using PxlOn-/PxlOff-sequences, is written to storage memory. It is only usable for validation purposes, cause it is rather slow. It uses the variables I an J as offsets.

L(oad) loads a bitmap. A filename is queried. The filename defaults to the recently used one. 
If you hit EXE the load will be performed. If you hit EXIT the operation is cancelled.
UP- and DOWN scroll through available files.
Any filename extension will be ignored. The load command uses the RAW file only. 
So if you follow a backup scheme, you only (but at least) have to save the RAW-file.

F(ill) fills the whole bitmap (or an edit-box, see below) with the currently selected color.

I(nv) inverts the whole bitmap (or an edit-box, see below) (black-white; ltgray-dkgray;transparent unchanged).

O(utl) frames the bitmap (or an edit-box, see below) with the currently selected color.

---

edit-box-mode:
The SHIFT-key starts the edit-box-mode by defining the first point of an edit-box. The startpoint is marked by a special cursor.
Using the UP/DOWN/RIGHT/LEFT-keys the second point is selected. 
While inside this mode the actually defined box can be copied into a clipboard with C(opy).
Complete this mode with another SHIFT-hit to freeze the second point.

Now F(ill), I(nv) and O(utl) operate on this active edit-box-area only. 
Additionally you can shift the contents of the edit-box with UP/DOWN/RIGHT/LEFT-keys.
Hint: a bit-line will be destroyed when pushed past an edit-box wall.

The edit-box-mode is terminated by a third SHIFT-key hit.

In normal mode the contents of the clipboard can be pasted in with the key N.

---

system-icon-browser(intrinsic resources):
In the 21x8 mode the keys + and - can be used to browse the FX-intrinsic FKey-icons (about 1000 samples). The internal number of the actually displayed FKey-icon is displayed below the bitmap.

system-symbol-browser(intrinsic resources):
In the 8x8 mode the keys + and - can be used to browse the FX-intrinsic symbols (about 700 samples). The internal number of the actually displayed FKey-icon is displayed below the bitmap.

Empty icons and symbols are skipped.

EXP can be used to change the stepwidth when browsing icons and symbols. The stepwidth is shown right of the internal symbol-/icon-number.

additional hints:

The recently used filename is stored in BMPEDIT.FNM in storage memory for convenience.
It will be stored only if it has been changed.
That reduces deleted file wastes in the storage memory.
You have to keep in mind, that recurrent save-operations temporarily eat up your storage-memory, 
making it possibly neccessary to optimize (free deleted files space) from time to time.

21x8 bitmaps are generally used as Fkey-description-icons (FX-OS format).

8x8 and 16x16 bitmaps may be used in a more general way.

Example:
the following C-code displays a Fkey-icon (Bdisp_WriteGraph_VRAM is not one of the fastest, though).

void Print_FKeyDescr( int FKeyNo, unsigned charText ){ 
DISPGRAPH WriteGraph;
  WriteGraph.x = 2+(FKeyNo-1)21;
  WriteGraph.y = 56;
  WriteGraph.GraphData.width=21;
  WriteGraph.GraphData.height=8;
  WriteGraph.GraphData.pBitmap=Text;
  WriteGraph.WriteModify = IMB_WRITEMODIFY_NORMAL;
  WriteGraph.WriteKind = IMB_WRITEKIND_OVER;
  Bdisp_WriteGraph_VRAM( &WriteGraph );
}
