* app/gimpdrawable.c: gimp_drawable_get_color_at() now silently
returns NULL again if the coordinates are out of range. A lot of
code using this function relies on this feature and correctly
checks the return value. No need to emit critical warnings here.
The GTK_CHECK_TYPE macro test for obj != NULL, no need to do this
check twice. Removed lots of unnecessary calls to g_return_if_fail().
* app/color_picker.c: with the old behaviour of
gimp_drawable_get_color_at() the code is a bit simpler.
* app/fuzzy_select.c: fuzzy_select relied on drawable_offsets()
returning off_x = off_y = 0 if drawable == NULL. Decided to change
this here, fixes bug #7077.
* app/gimpimage.[ch]: Even though we made bad experiences with the
changes in gimpdrawable.c, I have introduced similar argument checks
here.
* app/image_map.c: indentation
--Sven
paths.c and did a general namespace cleanup:
s/PATHP/Path*/ s/PATHIMAGELISTP/PathList/ and friends.
Paths are now copied on image duplicate (fixes bug #5726).
Removed Path Tool and XInput Airbrush from the build and
renamed "Layers & Channels" to "Layers, Channels & Paths".
Applied patch from Wolfgang Hofer to xjt.c that enables loading
and saving of paths based on Andy's change explained below.
--Sven
Tue Feb 15 23:27:42 GMT 2000 Andy Thomas <alt@gimp.org>
* gimp/app/gimpdrawable.c
* gimp/app/channel.c
* gimp/app/layer.c
* gimp/app/channel.h
* gimp/app/layer.h
* gimp/app/gimpimage.c
* gimp/app/gimpimage.h
* gimp/app/gimpdrawable.h
* gimp/tools/pdbgen/pdb/paths.pdb
* gimp/tools/pdbgen/pdb/layer.pdb
* gimp/tools/pdbgen/pdb/channel.pdb
* gimp/tools/pdbgen/pdb/gimage.pdb
* gimp/app/channel_cmds.c
* gimp/app/gimage_cmds.c
* gimp/app/internal_procs.c
* gimp/app/layer_cmds.c
* gimp/app/paths_cmds.c
New gimp_*_set_tattoo procedures. This allows save/load plugins
to save/restore tattoo states of layers, channels and paths. Note the
internal tattoo state can also be set, however rigorous checks are
performed to make sure that the internal tattoo states of layer,
channels and paths are consistent and that the new state value is
newval > MAX(MAX(layertattoo),MAX(channeltattoo),MAX(pathtattoo)).
2000-02-07 Michael Natterer <mitch@gimp.org>
* app/*
* libgimp/*
* plug-ins/*
* tools/pdbgen/*: did a global s/GUnit/GimpUnit/ and
s/GimpSizeEntryUP/GimpSizeEntryUpdatePolicy/
* libgimp/gimpcolorspace.c: renamed the parameter names to match
the names in the header.
* libgimp/gimphelpui.h
* libgimp/gimpimage.c
* libgimp/gimpmatrix.h
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpunit.[ch]
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: added documentation and use g* types
all over the place (enables cross-referencing with the glib and
gtk+ html documentation).
* plug-ins/common/exchange.c
* plug-ins/common/max_rgb.c: small cleanups.
* plug-ins/common/mapcolor.c: the color buttons were attached in
the wrong order.
Fri Oct 1 19:05:04 EDT 1999 Austin Donnelly <austin@gimp.org>
* app/gimpimage.c: Factored out common code from
gimp_image_{raise,lower}_layer and
gimp_image_{raise_layer_to_top,lower_layer_to_bottom}. They
now call gimp_image_position_layer() to do the real work.
* app/gimpimage.h: gimp_image_position_layer() takes extra arg to
tell whether an undo should be pushed.
* app/layers_dialog.c: reposition layer with undo.
* app/undo.c: new undo type for layer reposition. Layer rename
shouldn't dirty and clean the image twice!
* app/undo.h: prototype for undo_push_layer_reposition().
* app/undo_types.h: LAYER_REPOSITION_UNDO type.
* app/channel.h
* app/gimpimage.h
* app/gimpimageP.h
* app/layer.h
* app/undo.[ch]
* app/undo_types.h: use proper naming convention for undo enums,
and hide them from the pdbgen stuff
* app/procedural_db.h: don't skip PDB_END
* app/undo_history.c: remove gccism from undo_history_append_special
* libgimp/gimpintl.h: INIT_LOCALE should be defined in all cases
* plug-ins/script-fu/Makefile.am: add script-fu-constants.[ch]
* plug-ins/script-fu/script-fu.c: use init_generated_constants
* plug-ins/script-fu/siod.h: #include <stdio.h> for FILE *
* tools/pdbgen/script-fu.pl: new file
* tools/pdbgen/Makefile.am: add rule for constant script-fu gen
* tools/pdbgen/enumgen.pl: add enum skip feature
* tools/pdbgen/lib.pl: use nicks for gimpenums.h
* tools/pdbgen/pdb/procedural_db.pdb: ignore PDB_END
-Yosh
Mon Sep 20 12:51:30 EDT 1999 Austin Donnelly <austin@gimp.org>
Honest, guv, it's not a feature - it's a tightly integrated
package of undo system cleanups and fixes.
NEW FILES:
* app/undo_history.c: window showing recent undo (and redo) steps
available.
* app/undo_types.h: broken out of undo.h to fix circular includes.
MODIFIED FILES:
* app/Makefile.am: compile undo_history.c
* app/channel.h: use enum for channel undo type, not just magic
numbers.
* app/layer.h: same for layer undos.
* app/commands.c: edit_show_undo_history_cmd_callback() function to
pull up undo history window.
* app/commands.h: prototype for above.
* app/gdisplay.c: make undo / redo menu items sensitive according
to whether they would do anything. Would be easy to change
the text to say what would be undone/redone, but I don't know
the GTK.
* app/gimpimage.c: new signal emitted by gimage:
UNDO_EVENT. gimp_image_undo_event() function to emit it.
* app/gimpimage.h: prototype for above.
* app/gimpimageP.h: pushing_undo_group member is now an undo_type,
not an int. Keep undo history widget here too (if created).
* app/menus.c: add "Edit/Undo history..." to image menu.
* app/undo.c: new types: enums undo_type and undo_state rather than
ints and magic numbers. All undo_pop_* and undo_free_*
functions made static. New static function
undo_type_to_name(). Issue undo event signals on various
important events (eg undo pushed, undo popped etc).
undo_push() now takes a "dirties_image" arg to say whether
image should be dirtied. Layer moves now dirty the image. A
couple of g_return_if_fails () on undo_pop and undo_redo to
assert we're not in the middle of an undo group.
undo_get_{undo,redo}_name() to peek at names of top items on
undo and redo stacks resp. undo_map_over_{undo,redo}_stack()
to run a function for each item or group on stack. Layer and
channel undos use symbolic names rather than 0 or 1. Array
mapping undo types to names.
* app/undo.h: split out undo types to undo_types.h. Prototypes
for functions described above. undo_event_t enum.
undo_history_new() prototype lives here too.
Random other fixes:
* app/gimpdrawable.c
* app/image_render.c: default labels in switches to keep egcs happy.
* app/nav_window.c: some fixes to (sort of) cope with image res !=
screen res. Still needs work to handle non-square pixels
properly.
* app/paths_dialog.c: bad idea to call gimp_image_dirty()
directly. Even though it's currently commented out.
Wed Aug 25 02:40:39 CDT 1999 Shawn T. Amundson <amundson@gimp.org>
* app/image_new.[ch]: Added new files, the UI independant part of
new image dialog.
* app/file_new_dialog.[ch]: uses image_new stuff now. Alot
changed. No UI changed. Different behavior is a bug, as
this is only for UI separation.
* app/gimpimage.[ch]: Added gimp_image_get_width () and
gimp_image_get_height ().
* app/global_edit.c: Call a function in image_new instead of
file_new_dialog for updating the status of the cut buffe.
1999-08-24 Tor Lillqvist <tml@iki.fi>
* plug-ins/common/gpb.c: Added saving of .gih files.
* plug-ins/common/psp.c: Small changes, renamed the parasite.
* docs/parasites.txt: Suggesta a parasite for pixmap brush pipes.
* docs/gih.txt: Add the above parasite on the second line after
the number of brushes. Suggest how to edit brush pipes.
* docs/gpb.txt: Mention the gpb plug-in.
* app/pixmapbrush.c: Small clarification.
Fixes by Hans Breuer:
* libgimp/gimp.def: Add missing entries.
* app/gimpimage.h: Added declaration of gimp_image_{freeze,thaw}_undo.
* modules/makefile.msc: Drop the .msvc from dll names.
* plug-ins/common/jpeg.c: Guard inclusion of
unistd.h. (save_dialog): Restrict text box height to help people
with small displays.
1999-08-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/color_area.[ch]
* app/color_panel.[ch]
* app/gimpdnd.[ch]: enabled dnd for colors (compatible with the
standard gtk/gnome color dnd). The color selection is now invoked
on a real click, not on button_down to avoid confusion with dnd.
* app/channels_dialog.c
* app/disp_callbacks.c
* app/interface.c
* app/layers_dialog.c: minor dnd updates/fixes.
* app/channel.[ch]
* app/channel_pvt.h
* app/docindex.[ch]
* app/docindexif.[ch]
* app/drawable.[ch]
* app/floating_sel.c
* app/gimage.[ch]
* app/gimage_mask.c
* app/gimpdrawable.[ch]
* app/gimpdrawableP.h
* app/gimpimage.[ch]
* app/gimpimageP.h
* app/layer.[ch]
* app/layer_pvt.h
* app/undo.c
* app/xcf.c: wanted to do some s/int/gboolean/ in the layer files
where appropriate and found myself spending the whole night doing
a big code review for layers/channels/drawables/images:
s/int/gboolean/, s/<type>/g<type>/, lots of indentation, removed
some old global variables and deprecated functions, #include
cleanups, proper prototypes, copyright headers, ...
1999-08-20 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/Makefile.am
* app/gimpdnd.c: new file. Contains a function which creates dnd
preview icons for all kinds of drawables.
* app/gimpdnd.h: added the new dnd types.
* app/channels_dialog.c: same dnd functions as in the layers
dialog. Fixed channels_dialog_flush(). Code cleanup.
* app/layers_dialog.c: enabled dnd for layer masks.
* app/disp_callbacks.c
* app/interface.c: dnd code generalization. The toolbox and the
display accept drop of any kind of drawable now.
* app/gimage.h
* app/gimpimage.[ch]: new function gimp_image_position_channel().
* app/layer.[ch]: new function layer_mask_get_layer().
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
* tools/pdbgen/pdb/tools.pdb: revert previous change
* tools/pdbgen/pdb/guides.pdb: perform orientation xform here
* app/gimpimage.h: use 2 enums, one for internal and for external
* libgimp/gimpenums.h: change around external enums here
-Yosh
* tools/pdbgen/pdb/tools.pdb: hard code orientation constants for
shear and flip too maintain backwards compatibility
* app/gimpimage.h: remove ORIENTATION chop to avoid namespace
collision
-Yosh
1999-07-27 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/commands.c
* app/desaturate.[ch]
* app/equalize.[ch]: no need to pass the image as a void pointer
to desaturate and equalize.
* app/gimage.h
* app/gimpimage.[ch]: new function gimp_image_position_layer().
* app/layers_dialog.c: move layers with drag'n'drop.
* pixmaps/qmasknosel.xpm
* pixmaps/qmasksel.xpm: Ugly pixmaps that tigert promised to replace
* app/channel.[ch]
* app/channel_cmds.c : made some of the private structures accessible
through exported functions to keep things a bit clean
* app/interface.c
* app/gdisplay.[ch]
* app/gimpimageP.h
* app/gimpimage.[ch]
* app/undo.[ch]: added qmasks
* app/Makefile.am
* app/qmask.[ch]: added new files for qmask support
* tools/pdbgen/pdb/channel.pdb: changed some channel stuff to keep
things a bit more private
1999-05-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/[all files with resolution info]
* libgimp/gimp.h
* libgimp/gimpimage.c
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpunit.[ch]
* plug-ins/newsprint/newsprint.c
* plug-ins/pgn/png.c
* plug-ins/tiff/tiff.c: double instead of float for all resolution
and unit-factor variables.
* app/commands.c
* app/crop.c
* app/interface.c
* app/layers_dialog.c
* app/move_tool.c
* app/resize.c
* app/rotate_tool.c
* app/scale_tool.c: pass the image's unit *and* gdisp->dot_for_dot
to all functions which create sizeentries. Never create a
sizeentry with UNIT_PIXEL but with the image's unit and set it's
unit to UNIT_PIXEL after creation if dot_for_dot is on.
This way the image's unit can always be picked from the menu
without selecting "More...".
* app/interface.c: made the query_*_box() functions use the
ActionArea.
* plug-ins/gimpunitmenu.c: GTK_WIN_POS_MOUSE for the unit
selection dialog.
* app/gimpimage.h: guide types used to start at 1, so make them
start at 1
* tools/pdbgen/enums.pl
* app/guides_cmds.c: autogenned files reflect above change
-Yosh
Fri Mar 5 21:45:39 GMT 1999 Andy Thomas <alt@picnic.demon.co.uk>
This is a bit of a biggy. Added paths to layers & channels
dialog. This is not complete yet (it still has some rough edges ;-)
New:-
* paths_dialog.c
* paths_dialog.h
* pathsP.h
These are the core parts of the paths dialog & interaction.
* tools/penadd.xpm
* tools/pendel.xpm
* tools/pennorm.xpm
* tools/penedit.xpm
* tools/penstroke.xpm
New images found in the dialog. Maybe someone with a better
artistic flair could replace these?
Changed:-
* Makefile.am
Added new files for build
* layers_dialog.c
Added new tab for paths.
* bezier_select.h
* bezier_selectP.h
* bezier_select.c
Rearrangement & fixes. Not finished yet.
* iscissors.c
Header file changes. (Need to include more headers).
* gdisplay.c
* gdisplay.h
Hmmm... Added a function that did a mapping from gimage to gdisp.
This is a little bit of a "hack", but it was needed.. really.
* ops_buttons.h
* ops_buttons.c
Enhanced to create more types of button ops. Used in the paths dialog.
* channels_dialog.c
Header file changes?
* xcf.c
Paths stored in new PROP. Yosh.. I did as you and Adam suggested.
* gimpimage.c
* gimpimage.h
* gimpimageP.h
Added paths items to the image structures.
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
* app/gimplut.[ch]: new source files that implement pixel Look Up
Table functions.
* app/Makefile.am: build gimplut.[ch]
* app/brightness_contrast.c
* app/curves.c
* app/invert.c
* app/levels.c
* app/posterize.c: Use the new lut functions. Use
pixel_region_process_parallel in the PDB versions of these routines.
* libgimp/parasite.h
* libgimp/parasite.c: new functions parasite_name and
parasite_compare.
* app/gimpdrawable.c:
* app/gimpdrawable.h: new function
gimp_drawable_get_color_at(...) returns the RGBA[color index]
value at a specified position in the drawable. Don't set the dirty
bit on the image if a new parasite is the same as the old.
* app/gimpimage.c
* app/gimpimage.h new function
gimp_image_get_color_at(...) returns the RGBA[color index]
value at a specified position in the drawable. Don't set the dirty
bit on the image if a new parasite is the same as the old.
* app/by_color_select.c
* app/color_picker.c: use the new gimp_*_get_color_at
functions instead of messing with the tiles.
* app/layer.c: fixed a minor warning.
* app/commands.c:
don't scale the image if the new size == the old size
* app/channel.c: optimized channel_bounds by only checking the
pixels in a tile if it is not already entirely within the
currently computed bounds.
Sun Feb 7 15:04:23 GMT 1999 Adam D. Moss <adam@gimp.org>
* app/fileops.c: More robust and kickin' thumbnail support.
* app/edit_selection.c app/layer.c app/layer.h: Working
on lazy opaque layer moves. Disabled for now.
* app/gdisplay.c
* app/gimage.h
* app/gimpimage.c
* app/gimpimage.h
* app/image_render.c
* app/tile_manager.c: Errr, I don't remember. No, seriously.
Nothing of consequence.
Mon Jan 18 22:55:19 GMT 1999 Adam D. Moss <adam@gimp.org>
* app/gimpimage.c app/gimpimage.h:
Part one of an effort to allow a one-layer gimage
to share tiles with its own projection courtesy of
copy-on-write, where sane. This can save megabytes
when working with such images.
The code is 'mostly working' rather than 'perfect',
so it's disabled until I have time to finish it.
Redid the indexed palette dialog to not crash, to be a bit more
usable, and to be a cleaner module. A first shot at using gcg in
actual practice.. If something is screwed, let me know!
Fri Dec 18 23:46:11 GMT 1998 Andy Thomas <alt@picnic.demon.co.uk>
Changed the palette dialog. New functionality. Better previews.
Can display larger palettes. Can import palettes from images and from
gradients. Fixed colour selection so that the hightlighted
square says in sync on redraws.
* app/convert.h
* app/palette.h
* app/palette.c
* app/gradient.c
* app/gradient_select.c
* app/gimage.c
* app/gimpimage.c
* app/gimpimage.h
New file:-
* app/palette_entries.h
First set of changes to integrate GAP (Gimp Animation Plugin written
by Michael Hofer)
New functions: gimp_layer_[get|set]_linked
gimp_image_raise_layer_to_top
gimp_image_lower_layer_to_bottom
--Sven
Sat Nov 14 23:16:55 GMT 1998 Austin Donnelly <austin@greenend.org.uk>
* app/gimpimage.h
* app/gimpimageP.h
* app/gimpimage.c
* app/gimage_cmds.c
* app/file_new_dialog.c
* app/info_window.c
* libgimp/gimp.h
* libgimp/gimpimage.c
* plug-ins/newsprint/newsprint.c
* plug-ins/tiff/tiff.c: gimp_image_{get,set}_resolution() calls
now get and set both X and Y resolutions. Gimp image struct now
has two resolution fields, one for each direction. I've updated
the two plugins which used the info (TIFF and newsprint).
* app/gimage_cmds.c app/gimage_cmds.h app/gimpimage.c
app/gimpimage.h libgimp/gimp.h libgimp/gimpenums.h
libgimp/gimpimage.c: Moved the guide PDB functions into
a more sensible place, made them accessible to plugins
through libgimp.
Mon Aug 31 16:33:11 CDT 1998 Larry Ewing <lewing@gimp.org>
* app/gimpimage.[ch]
* app/gimage_cmds.[ch]
* app/layers_dialog.c: Added merge down procedure, I'm not really
sure if this behaves the way people expect it to, so please send
me any comments on what it actually should do. It also needs a
little testing, especially the pdb call.
* app/gimpimage.c: cleaned up Seth's merge commit a little. Also
changed the mode of a merged layer to normal, as this seems to be
the proper thing. Discussion is welcome here as well.
* app/gimage.h app/gimpimage.c app/gimpimage.h
app/internal_procs.c app/layer.c app/xcf.c:
Guide creation/deletion/query is now available as
PDB procedures. Not yet directly exported to libgimp,
and needs to be moved into gimage_cmds.c, but it
works.
ok, i modified *way* more files than CVS is telling me....
- add canvas_init machinery (tile_manager_validate equivalent)
- fix bugs in compositing code
- layers/channels dialog, previews
- all color handling should be fairly precision independent now
- replaced gimage_type and gimage_base_type with Tags
- remove concept of flat vs. layered gimages
ray lehtiniemi <rayl@netrover.com>
bookkeeping without being used). Made copy_region more intelligent on
when to use tile sharing; some changes made to pixel_regions to
facilitate this. Fixed a refcount problem with xcf load and probably
a few other bugs that I've forgotten about. Added a sanity check in
set_undo_tiles to help with a problem larry is reporting with airbrush
and xinput. --sg
Started separating crud out of drawables.
Isolated the id system of images entirely within pdb. Even the
window titles and menus use pointers instead of ids. Should at
least remind people that this is a developers' version. :)
to detect if an image still exists, some things may, for now,
access freed images and break. This will be fixed once proper
destroy handlers are added.