Guest
Feb 23, 2012, 1:49 am UTCHome arrow Front Blog arrow True Color Edition - Fox Patch Editor 1.2.622
header image
True Color Edition - Fox Patch Editor 1.2.622
Written by Dream Dancer   
Aug 24, 2008 at 12:00 AM

There's always a degree of anxiety when releasing a program out for people to use, there's bound to be something overlooked.

But before we get into a discussion of that ability:
Furcadia Does NOT Currently Support True Color Patches

At least, in the manner in which I'm generating the contents of the shapes in the patch file. Maybe I'm doing it wrong? I don't know, and won't know until I find out. To explain this requires some explanation. True color, as quite a few people know, involves 24 bits of color, that's 8 bits for each part of the color. However, there's also one which is 32 bits per pixel, that's your 24 bits of color, plus 8 bits for transparency to permit alpha blending of the image over what is already displayed.

 

According to what I've read so far on the subject, you don't need 32 bits to actually do alpha blending, because you can also put an alpha channel into a palette, so you end up with a 8 bit image that has transparency in it. But that would not be true color even though it does expand the available colors in each image, you're limited to a total of 256 colors. You can also do alpha blending by specifying a single alpha blending component, that is, a single 8 bit value which determines how much to blend the source onto the destination. Well, that works too, however, you don't get quite the dynamic range of blending as you would with using an alpha value for each pixel.

With all that aside, further work on dealing with true color images is not a priority issue until I get better information on how DEP is going to implement true color and alpha blending. So first, I'll bring up what is working in the image editor.

Currently, the only image tool buttons which are not working in the image editor is the Hand, Select, and Text features. Of the next 4 buttons, which the first two is supposed to center on the overall "drawn" image, and the other is supposed to zoom out full temporarily, those aren't working. But the Zoom In and Zoom Out does work. And all 6 brush shapes work. However, I need to work on the line maker for sizes 2, 3, and 4, my sub-system does not work as expected. Brush sizes 1, 5, and 6 do work as expected. That will be addressed and corrected at some point.

Something to note about drawing on "non-furcadia palette" images, is that you're going to be drawing on them with the furcadia palette, so until I get a palette manager in place, you will have funkiness. What happens is that GDI does nearest color matching of the drawing color to a color in the palette of the image you're drawing on. But this only applies to palette images, drawing on high color images will just put down the color that you're using.

You actually have 3 colors you can draw with, I saw no reason to exclude the middle mouse button from being used for drawing. The mouse wheel is also used as well, spin the wheel to scroll the image up and down, CTRL+wheel will go from side to side, and Shift+wheel up will show / hide a fast palette in the image window itself. Shift+wheel down will also do something, that's a fast menu I'm implementing into the program so you can do menu actions without having to click on a menu selection on the main image manager window. Nothing to see there yet, lets move along now, ...

There's a reason for that desire to implement menu selections inside the image window itself, due to disabling of drawing when the focus is not on the window, until the window has focus, it won't put a pixel down. So if you click back to the image window after having having the focus on another window, you won't accidentally make a random dot. Under some circumstances the window does not get the notification that it's now the active window, you can tell whether it's enabled for drawing or not by looking at the right part of the status bar, if it's depressed, it will draw. If, after clicking back to an image window, it don't depress, then click on the manager then back on the image window.

Holding down the CTRL key will temporarily switch the system into EyeDropper mode, if you click on a color from the current palette, that color will be assigned to the mouse button you press. If it's not a color from the current palette, nothing happens, you can force a near match to the current palette by also holding down the shift key as well.

The furcadia palette is the only one available at this time, one of the foremost burner projects is the "true color" palette, which will be a handler for up to 256 colors of your own choosing, plus have the ability to manage more than one set of colors in that palette. To be determined how to do. The notation of "current palette" is a reference to the fact that you will be able to use a wider selection of colors at a later date.

Drawing Tools

Pencil works as expected, do note that I'm not implementing a tracking of the draw, if you move faster than your system will send mouse messages to the program, you will hop and skip. Drawing with color 0 will erase. Note that the brush of the current shape and color follows the mouse, this can be toggled using the menu selection under the View menu on the main window, or using CTRL+B to toggle it. If you're drawing with color 0 as the left mouse button, it will show up in that nifty pink color.

Erase erases the area under it with the shape of the current brush. Like anything else, if you're not dealing with a furcadia palette image, or a high color image, strange results may occur.

Hand does not work, on the front burner, aside from bugs.

Pick color, as explained above, looks for a color which is in the current palette.

Select does not work, on the front burner.

Paint, works, flood fills the area defined by the clicked on color with the color of the mouse button.

Line works, with the exception noted above about the not quite right on brush sizes 2, 4, and 5.

Hollow, Filled, and Solid rectangles work, if you hold down the Shift key when drawing your rectangle, it maintains the square of the shortest side. Because of the presense of the middle mouse button being available for drawing, if you use the middle mouse button, it will still use the background color for the filled shapes. On solid shapes the color is whatever button you click.

Text does not work, on the front burner, and will be nice when done.

Circles follow rectangles in drawing attributes, with the exception that they're round.

Note that you can use color 0 for any of the color attributes on shapes.

Menu Operations

As I build them, they will become enabled. On any menu item which contains a shortcut key, that key combination may also work when an image window is active. I will note the ones that work as I progress down this list.

File

  • New - Creates a new image window 255x255 using the furcadia palette
  • Open - Opens an existing image for editing, currently supported images for opening are:
    • *.BMP;*.GIF;*.JPG;*.JPEG;*.PCX;*.PNG;*.TGA
  • Save & Save As - Saves an existing image, no color conversion is available to convert the saved image to other color depths, and currently FreeImage does not save to PCX images. Will have to probably study that format and add a hard handler into the system.
    If an image you're editing belongs to a patch file, it will not change the title of the image window.
    The shortcut keys for New, Open, and Save do not work when an image window has the focus, and the CTRL+S may be removed from the system, or something. The reason is for the next two elements of the File menu:
  • Store & Store As - Assigns the current image to the currently opened patch file. If there is no patch file open, will permit the creation of a new patch file. If the image is not a furcadia palette image, or a 32bit image, will also prompt you about converting the image. Unless you got 32bit image saving to patch files enabled, you won't be able to store them. More on the secret of enabling that somewhere in this post here. If the image is not assigned, or you've invoked the Store As method, the program brings up the Fox Editor window and permits you to insert the image or replace anything that's currently there.
    At this time, I'm thinking that CTRL+D should be the shortcut assigned to the Store functions. Which is why CTRL+S may not work in the image window, might use CTRL+W or something, dunno.
  • Get Another Shape - If you have a patch file open, will display the Fox Editor window and let you get another shape for editing, oh yeah, you can edit multiple images, you're not limited to a single window. That's the whole purpose of separating the image editing of a patch file from the editing of the patch file's properties itself.
  • Big Window - Just makes a big surface to work with. Storing anything bigger than 255x255 into a patch file trims it to fit.
  • Exit Editor - Same as the X in the corner, if you have images which have not been stored or saved to disk, you will get prompted about saving them.

Edit

  • UnDo is a lie, this does not work currently in the manager, CTRL+Z does work when in an image window.
  • ReDo - To be implemented.
  • Cut, Copy, Paste, Select All - To be implemented, on the front burner.
  • Flip & Rotate - To be implemented.
  • Skew - To be implemented.

Eh, lot of those so far, ...

  • Chop - Trim To Fit - This does a trim of all transparent pixels and fits the resulting image flush to the upper left corner of the image surface.
  • Convert Colors - Convert Colors - Oh the redundancy! sb.gif This brings up a dialog box which permits you to change the image to the furcadia palette in one of two ways. First is as expected, will convert the image to the furcadia palette, the second is for giggles, if the image is palletized, it will just overlay the furcadia palette onto the image's current palette. If you went and clicked the head in about and entered the title into the dialog, you will also have the Convert To True Color option available in the dialog. You will get this message:
    "Enter the magic word. By entering the word into the space below, you acknowledge that any problems you induce by attempting to USE True Color patches in furcadia are your problem. I am only providing a possible 3rd party editor which permits you to create true color patches, while defaulting to saving standard furcadia palette patches as the primary file. Note that this will save two patch files, one in the true color folder, and one in the main folder."
    To understand what is meant by two patch files, at that point, if you stick the true color image into a patch file, existing or new, and save that patch file, the program will, with another prompt, create a folder in the folder which you are saving the file called "True Color". The true color patch file will be in that folder while the patch file in the current folder is transparently converted to furcadia palette images. When you open a patch file, and there's a folder called "True Color" in that folder, and there's a patch file with the name of the patch file which you are opening, the program will open the true color version instead.

View

  • Not much here, just options for controlling the display of the cursor brush, bringing the palette tool box forward, and viewing some information about the current image.

Window

  • Will hold the list of open image windows.
    Note that the image windows don't show up in the taskbar, that's to keep things uncluttered.

Palette Window

The palette window, in addition to managing the palettes which are used in the program, also contains the buttons for handling the drawing surface's background, either light blueish, checkerboard, or sortof yellow. To the left of that is the color indications for the current colors assigned to the mouse buttons, it's Left and Right on top of Middle. The index into the current palette is also shown below that, when palette management becomes a reality that will be updated when you switch amongst the various palettes available. I have plans to use markings on the colors in the palette display to indicate selections, just not sure about the overall implementation at this time.

Just below the background buttons is a label called Fast Palette, this was discussed above, it's a quick 8 color palette which can be shown in each image window, currently it's global. To set colors into the fast palette, you open it in the palette manager, click on the color you wish to change, then on the color from the palette you want to change it to. Like palettes, you will be able to save fast palettes in the future.

And then at the top of the dialog, there's mode switches for selecting a normal palette, versus a palette where all the remappable colors are removed and placed below in their own selection boxes.

Back To The Fox Editor!

File

Aside from the New, you can also export selected shapes to files, import single picture into the patch file, and import shapes or frames from other patch files.

When in import mode, you will have your patch file list on the left, and the source on the right, with the edit patch's current shape on top, and the import shape list to the right of the frame holding the buttons for inserting shapes or frames. Like everything else, there's undo features on this, and pressing Cancel will revert your patch file back to the state it was in before you started the import. The mode also permits you to remove shapes and frames from the patch you are editing, so you don't have to change modes. CTRL+Z is available when doing import so a mistake does not require you to exit the mode.

Drag and drop works, more or less, there's parts of the editor which will not act like a drop point, I'm not adding that to every frigging control, just the main areas of the editor. This extends to the import window so you can just drop another patch file and continue to import shapes without having to exit the import mode and open another file for importing. Do note that you have to drop the desired import file onto the import list, dropping elsewhere on the window will invoke the default open, and will open the results in import mode, after, of course, prompting you to save your edits.

CTRL+G will launch the current image into the image editor.

I've got a fairly decent verification system for kitterspeak built into the program, so there's now a menu selection under Edit when in kitterspeak mode which will scan the entire patch file for kitterspeak errors. Syntax errors that is, like when you're jumping to the same step due to chopping out something else, or trying to display a frame that no longer exists. When you display the kitterspeak for an shape, it will highlight such errors with "<-- Error".

Mass Change Positions needs to be thought out.

Shape menu

Current FBJ & Set to DEFAULT does not work. Along with Reset to Last Saved, that's supposed to simply extract the shape from the file on disk. Problems is that if you happen to add a shape before the currently selected on, you get the wrong shape, so, this menu option needs thinking.

Add Remove Shapes changes the mode of the editor, displaying a selection box below the preview picture where you can insert new shapes, or frames, or even remove them. The cancel button reverts the patch file to the state it was in BEFORE you invoked the mode, so all changes are discarded. This is the same mode you are in when inserting an image from the image editor, in that case you can't remove shapes or frames, but you can replace the current image. CTRL+Z does not work in this mode due to the need for it to be dual nature in how it works, either from the Fox Editor mode to edit the patch, or from the Image Editor when storing a shape.

Swap Shapes & Swap Frames permits you to highlight a couple of shapes / frames and swap them about, swapping shapes moves everything, frames just carry their positioning information. If you have a couple of frames highlighted and swap shapes, it defaults to swapping frames. Note that this swaps the FIRST two elements it finds in the list which are highlighted, rotating a set of shapes / frames will be something for later on.

Merge Shapes is something which will permit you to highlight a bunch of shapes, or even possibly frames, and convert them into one shape, or merge them into an existing shape. Marvelously complex feature, hence it ain't done yet.

View

View Placement is the position editing mode of the editor, hmm, need to get the Furre Position system in place, okies, new front burner priority objective. Note that you DON'T have to click on the shape to move it, the whole window is considered the target for the click when you mouse down, so you can move things into and out of view. But because you can full screen the program's window, you get a large surface to work with when adjusting shape properties.

Ahh, anyone offhand know what the default offsetting is supposed to be for getting the furre position?

When viewing placement, the display changes and shows the shape in relationship to the default floor position, drag it to where you want it. That strange option which can be invoked with CTRL+T merely pops the default floor in front of the shape you're manipulating, hows that for a trick?

Eh, sorry about the system jumping the window about when placing stuff, it's a tad annoying to me as well, will look into a means for better controling that.

View With Family is another marvelous trick where you can build a family of object to work when when lining up a bunch of objects. The not sure part is storing that family, it's tempting to use another frame within the patch file somehow with some sort of signature to indication it's a family system. Also a complex system so it will be a bit before being implemented.

Hide Shape List does not work quite as expected, but it does remove it from view, ...

(Expected that when you hide the shape list, the image window does not bounce about when the columns get resized. Overlooking something.)

View With Default, when working, will display the current shape alongside the same shape as the one found in default.

View Kitterspeak / View Properties - CTRL+K toggles the window back and forth between kitterspeak mode and properties mode.

Help

New thing here is the View Undo Stack, will put the editor into a mode where you can see what you've done so far, at least as I've named the various actions. When viewing them, you can also flush the stack, or select a point in the stack to roll back to, this will permit you to undo a whole bunch of edits in a single shot. The list will also indicate to you where the last time you saved the patch file is. If you don't see that marker, then you ain't saved the file since you started editing it.

That's it for now, have fun, and remember:
Furcadia Does NOT Currently Support True Color Patches

Cake and ice cream anyone?

Did I overlook something? Possible, this has become a large project with about 16,000 lines of code in 563 sub routines spread out over 23 modules and forms with wads of other things.

And actually, I only wanted to get my itools into a graphical handler.

Last Updated ( Oct 11, 2008 at 01:14 PM )
header image