2003-11-25 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.c (gimp_paint_core_scale_mask):
invalidate the solid brush cache as well. Should fix#127681.
2003-10-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added new virtual functions
GimpDrawable::get_active_components(), apply_region() and
replace_region().
* app/core/Makefile.am
* app/core/gimpdrawable-combine.[ch]: new files containing
apply_region()'s and replace_region()'s default implementation.
They are identical to the ones removed from GimpImage except that
they don't mask the selection with itself (bug #107949).
* app/core/gimpchannel.c
* app/core/gimplayer.c: implement get_active_components().
* app/core/gimpchannel.c: implement apply_region() and
replace_region() and invalidate the channel's boundary
before upchaining (bug #107949).
* app/core/gimpimage.[ch]: removed gimp_image_apply_image(),
gimp_image_replace_image() and gimp_image_get_active_components().
* app/core/gimpimage-undo-push.c (undo_pop_image): invalidate
boundary and bounds if the drawable is a channel (bug #107949).
(undo_pop_mask)
(undo_pop_channel_mod): finish previous commit :)
* app/core/gimp-edit.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/paint/gimppaintcore.c
* app/tools/gimpinktool.c: changed accordingly.
2003-10-06 Michael Natterer <mitch@gimp.org>
Treat changes to the selection like changes to any other drawable:
* app/core/gimpchannel.c
* app/core/gimpchannel-combine.c: call gimp_drawable_update() after
changing the channel.
* app/core/gimpimage.[ch]: added struct GimpImageFlushAccumulator
with one member "gboolean mask_changed". Connect to "update" of
the selection and set accum.mask_changed to TRUE in the callback.
Added default implementation for GimpImage::flush() and emit
"mask_changed" there.
Unrelated:
* app/core/gimpimage.h: removed GimpGuide struct...
* app/core/gimpimage-guides.h: ...and added it here.
* app/core/gimpimage-undo-push.c (undo_pop_mask)
(undo_pop_channel_mod): don't distinguish between selection and
non-selection channels and just call gimp_drawable_update().
* app/core/gimpundo.h
* app/core/gimpimage-undo.c: removed "gboolean mask_changed" from
the GimpUndoAccumulator struct since we don't have to care about
that signal explicitly any more.
* app/display/gimpdisplay-foreach.[ch]: removed gimp_displays_flush().
* tools/pdbgen/pdb/display.pdb (displays_flush_invoker): call
gimp_image_flush() on all images so the flush accumulator is
honored.
This generalization enables the removal of more special purpose
code which was needed to treat the selection different:
* app/core/gimpimage-mask-select.[ch]: removed...
* app/core/gimpchannel-select.[ch]: ...and added under a new name
because it's not selection specific any more.
* app/core/gimpimage-mask.[ch]: removed...
* app/core/gimpselection.[ch]: ...added the two remaining
functions here. Removed all calls to gimp_image_mask_changed().
* app/core/Makefile.am
* app/core/gimp-edit.c
* app/core/gimpdrawable-transform.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-snap.c
* app/display/gimpdisplayshell.c
* app/gui/channels-commands.c
* app/gui/layers-commands.c
* app/gui/select-commands.c
* app/gui/vectors-commands.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimprectselecttool.c
* app/tools/gimptransformtool.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpvectorstreeview.c
* app/xcf/xcf-save.c
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly.
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpimage-colormap.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/gui/image-menu.c
* app/paint/gimppaintcore.c
* app/tools/gimpcroptool.c
* app/tools/gimpinkoptions.c
* app/tools/gimpvectortool.c: removed useless and/or obsolete
#includes.
* app/pdb/display_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated.
2003-09-17 Michael Natterer <mitch@gimp.org>
Added nomis' favorite feature ;)
* app/paint/gimppaintcore.[ch]: added gimp_paint_core_cancel()
which can be called instead of gimp_paint_core_finish().
It simply copies core->undo_tiles back to the drawable instead of
pushing them to the undo stack.
* app/tools/gimppainttool.c (gimp_paint_core_button_release): call
_cancel() instead of _finish() if the right mouse button is
pressed.
2003-09-06 Michael Natterer <mitch@gimp.org>
To optimize duplicate and/or wrong image updates away, introduced
new policy that a child object must never explicitly update or
invalidate its parent object (just like the GUI is not updated
explicitly by the core):
* app/core/gimpdrawable.[ch]: added new signal
GimpDrawable::update(). Never update or invalidate the image when
the drawable is updated or invalidated.
(gimp_drawable_set_visible): don't gimp_drawable_update() the
drawable since its pixels have not changed.
* app/core/gimpimage.[ch]: connect to the "add" and "remove"
signals of the layers and channels containers. Also connect to the
"update" and "visibility_changed" signals of all drawables in
these containers (optimizes away updates issued by drawables which
are not yet added to the image and updates of the selection
mask). Also, don't propagate updates to the image if the emitting
drawable is invisible (optimizes away updates issued by invisible
drawables).
(gimp_image_add_layer,channel)
(gimp_image_remove_layer,channel): don't update the image since
that's done by our "add" and "remove" handlers now.
(gimp_image_position_layer,channel): update just the image, not
the drawable since its pixels have not changed.
(gimp_image_real_colormap_changed)
(gimp_image_set_component_visible): always call
gimp_image_update() *and* gimp_viewable_invalidate_preview() to
get everything updated, since update and invalidate of images are
not connected.
* app/core/gimpimage-undo-push.c (undo_pop_layer,channel): don't
update the drawable since (a) its pixels don't change and (b) the
image updates itself upon adding/removing now.
(undo_pop_layer_mod): replaced gimp_image_update() by
gimp_drawable_update() (just for consistency with other similar
functions).
* app/core/gimplayer.c: connect to "update" of the layer mask and
issue updates on the layer if the mask update has any effect on
the projection.
(gimp_layer_create_mask): don't set the mask's offsets here since
they may be different when we later add the mask to the layer.
* app/core/gimplayermask.c (gimp_layer_mask_set_layer): set the
mask offsets here instead.
* app/core/gimpchannel.c (gimp_channel_translate): update the
channel even if push_undo == FALSE.
* app/paint/gimppaintcore.c (gimp_paint_core_finish)
* app/tools/gimpinktool.c (ink_finish): invalidate both the
drawable and the image preview since invalidating the drawable
doesn't invalidate the image any more.
* app/text/gimptextlayer.c (gimp_text_layer_render_now): also
update the new extents of the text layer, not only the old one.
(gimp_text_layer_render_layout): don't update the drawable since
gimp_drawable_fill() already updated it.
2003-09-05 Michael Natterer <mitch@gimp.org>
* app/paint-funcs/paint-funcs.[ch]: removed function map_to_color()
since it does not belong here and the two places using it look much
cleaner when doing that stuff themselves.
* app/core/gimpdrawable-preview.c: cleanup.
(gimp_drawable_preview_scale): do the indexed palette lookup here
instead of calling map_to_color().
* app/core/gimpimage.c (gimp_image_get_color): transform the
colors here instead of calling map_to_color().
* app/core/gimpimage.[ch] (gimp_image_get_color): reordered
parameters src parameters are before dest parameters.
Made the src color const.
(gimp_image_transform_color): reordered so src parameters are
*after* dest parameters (since this function operates on the dest
image and it makes sense to have the dest parameters
together). Made the src color const here, too.
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable.c
* app/core/gimpimage-contiguous-region.c
* app/core/gimpimage-projection.c
* app/core/gimpimagemap.c
* app/core/gimplayer.c
* app/core/gimppalette-import.c
* app/paint/gimpclone.c
* app/paint/gimppaintcore.c: changed accordingly.
* app/core/gimpedit.c (gimp_edit_cut,copy): simplified by
moving the "cropped" variable to a local scope.
* app/core/gimpimage-mask.c: calling gimp_image_update() followed
by gimp_viewable_imvalidate_preview(drawable) is equal to calling
gimp_drawable_update() directly.
2003-08-31 Manish Singh <yosh@gimp.org>
* app/paint/gimppaintcore.c: inlined rotate_pointers, made it specific
to gulongs (made more sense to me than adding casts)
* app/paint/gimppaintcore.c: paint_core_interpolate now takes care
of setting core->last_coords. Don't reset core->distance in
paint_core_start (fixes problem with shift-click brush strokes).
Improved brush placement for stroked selections in
paint_core_interpolate.
* app/paint/gimppaintcore-stroke.c: dont need to set
core->last_coords anymore.
* app/tools/gimppainttool.c: dont need to set core->last_coords
anymore. Set core->distance in gimp_paint_tool_button_press.
2003-08-14 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore.c (gimp_paint_core_subsample_mask): use
g_new0() instead of g_malloc() followed by memset(). Some coding
style cleanups.
2003-07-24 Michael Natterer <mitch@gimp.org>
* app/tools/gimppainttool.[ch]: removed the brush outline members
since we have no chance to really cache them without duplicating
GimpPaintCore's brush change notification code.
* app/paint/gimppaintcore.[ch]: added the outline here and really
cache it this time. The paint_core doesn't create or use the
outline but frees and NULLifies it whenever the brush changes.
2003-07-22 Michael Natterer <mitch@gimp.org>
* app/core/gimpgradient.[ch]: added "gboolean reverse" to
gimp_gradient_get_color_at() so all gradients can be used
reversed.
* app/core/gimpdrawable-blend.[ch] (gimp_drawable_blend)
* app/core/gimppalette-import.[ch] (gimp_palette_import_from_gradient):
added "gboolean reverse".
* app/paint/paint-enums.[ch]: removed enum GimpGradientRepeatMode
since it is identical to GimpRepeatMode, except for the now
obsolete ONCE_BACKWARD value.
* app/paint/gimppaintcore.[ch]: removed
gimp_paint_core_get_color_from_gradient()...
* app/paint/gimppaintoptions.[ch]: ...and added
gimp_paint_options_get_gradient_color(), which is much more
general. Added a "reverse" property to GimpGradientOptions and
changed the type of the "repeat" property to GimpRepeatMode.
* app/paint/gimppaintbrush.c: use
gimp_paint_options_get_gradient_color().
* app/tools/gimpblendoptions.[ch]: removed the "repeat" property
since it is in the parent class now.
* app/gui/gradient-select.c
* app/gui/palette-import-dialog.c
* app/widgets/gimpgradienteditor.c
* app/tools/gimpblendtool.c
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/misc_tools.pdb: changed accordingly.
* app/tools/gimppaintoptions-gui.c: added a "Reverse" toggle right
of the gradient preview.
* app/widgets/gimppreviewrenderergradient.[ch]: added "gboolean
reverse" member and gimp_preview_renderer_gradient_set_reverse()
API.
* tools/pdbgen/pdb/paint_tools.pdb: fixed the paintbrush invoker
to set GimpPaintOption's "use-fade" and "use-gradient" properties
correctly.
* app/pdb/gradients_cmds.c
* app/pdb/misc_tools_cmds.c
* app/pdb/paint_tools_cmds.c
* libgimp/gimpenums.h
* libgimp/gimpmisctools_pdb.[ch]
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: removed GimpGradientPaintMode
here too since it was only exported accidentially (it's not used
by any external API).
* plug-ins/script-fu/scripts/3dTruchet.scm
* plug-ins/script-fu/scripts/alien-glow-arrow.scm
* plug-ins/script-fu/scripts/alien-glow-bar.scm
* plug-ins/script-fu/scripts/alien-glow-bullet.scm
* plug-ins/script-fu/scripts/alien-glow-button.scm
* plug-ins/script-fu/scripts/alien-glow-logo.scm
* plug-ins/script-fu/scripts/basic1-logo.scm
* plug-ins/script-fu/scripts/basic2-logo.scm
* plug-ins/script-fu/scripts/beveled-button.scm
* plug-ins/script-fu/scripts/blended-logo.scm
* plug-ins/script-fu/scripts/burn-in-anim.scm
* plug-ins/script-fu/scripts/coffee.scm
* plug-ins/script-fu/scripts/comic-logo.scm
* plug-ins/script-fu/scripts/coolmetal-logo.scm
* plug-ins/script-fu/scripts/glossy.scm
* plug-ins/script-fu/scripts/gradient-bevel-logo.scm
* plug-ins/script-fu/scripts/gradient-example.scm
* plug-ins/script-fu/scripts/pupi-button.scm
* plug-ins/script-fu/scripts/rendermap.scm
* plug-ins/script-fu/scripts/sphere.scm
* plug-ins/script-fu/scripts/starscape-logo.scm
* plug-ins/script-fu/scripts/test-sphere.scm
* plug-ins/script-fu/scripts/textured-logo.scm
* plug-ins/script-fu/scripts/title-header.scm
* plug-ins/script-fu/scripts/weave.scm: pass "reverse" to
gimp_blend(). Pass FALSE in most cases and added script
parameters were it makes sense.
2003-07-16 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.[ch]: added utility function
gimp_paint_options_get_fade() which calculates an opacity
value from paint_core->pixel_dist.
* app/paint/gimppaintbrush.c: removed the same code here and use
gimp_paint_options_get_fade().
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimpsmudge.c: enabled fade for all paint tools, along
with a general opacity cleanup:
Use the opacity from gimp_context_get_opacity() *only* for the
image_opacity. In particular, *never* use it as initial value for
calculating the brush_opacity. Instead, start calculating the
brush_opacity from gimp_paint_options_get_fade() and return early
if it returns 0.0, if not, multiply tool specific opacity sources
like the current pressure.
(This changes the effect of the paint tools for particular opacity
values, but makes the impact of opacity on the final rendering
linear and more intuitive)
* app/tools/gimppaintoptions-gui.c: enabled the "Fade" frame for
the tools above.
* app/paint/gimppaintcore.c: purely cosmetic cleanup.
2003-07-14 Michael Natterer <mitch@gimp.org>
* app/paint/gimperaseroptions.[ch]: removed "gboolean hard"
member/property...
* app/paint/gimppaintoptions.[ch]: ...and added it here. Added
gimp_paint_options_get_brush_mode() utility function.
* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimppaintcore.h
* app/paint/gimppencil.c
* app/paint/gimpsmudge.c: use the new utility funtion where
appropriate. Removed trailing whitespace.
* app/tools/gimpdrawtool.[ch] (gimp_paint_tool_draw_boundary):
changed offset parameters from gint to gdouble so we can show the
brush preview at sub-pixel positions.
* app/tools/gimppainttool.c: use sub-pixel coordinates for the
brush preview if paint_options->hard is FALSE (doesn't work for
the pencil yet).
The new brush preview unveiled that the positioning of even-sized
brushes if off by 0.5 for soft brush application mode and off by
1.0 for hard application mode:
* app/paint/gimppaintcore.[ch] (gimp_paint_core_subsample_mask):
offset painting by 0.5 pixels on the brushes' even sized axes by
shuffling the subsample matrices around.
Added "subsampling" for HARD brush application mode since a pixel
of an even sized brush can snap to up to four different image
pixels depending on the sub-pixel coordinates of the stroke.
2003-05-26 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager-private.h: added "gint ref_count" to the
TileManager struct.
* app/base/tile-manager.[ch]: replaced tile_manager_destroy()
by tile_manager_ref() and tile_manager_unref().
* app/core/gimpimage-undo-push.c: ref the tile managers stored in
the undo system and DON'T destroy them if no undo could be pushed.
Should fix the remaining crashes with undo disabled like in
bug #9350.
(!!!) Note that the tiles passed to gimp_image_undo_push_image()
and gimp_drawable_push_undo() as well as the tile managers of
drawables passed to gimp_image_undo_push_[layer|channel]_mod()
must be unref'ed by the caller now.
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste):
don't take ownership of the passed tiles but ref them if needed.
(!!!) Callers must unref the passed tiles themselves now.
* app/core/gimpbuffer.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-offset.c
* app/core/gimpdrawable.c
* app/core/gimpedit.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-projection.c
* app/core/gimpimage.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/paint/gimppaintcore.c
* app/text/gimptextlayer.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimptransformtool-undo.c
* app/tools/gimptransformtool.c: changed accordingly.
2003-05-23 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.c
* app/tools/gimppainttool.c: applied a patch from Henning Makholm
<henning@makholm.net> that improves drawing of narrow straight lines
by moving the endpoints to pixel centers. Fixes bug #84145.
2003-04-13 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintoptions.c: changed the "fade-length" and
"gradient-length" minimum values to 0.0 for compatibility with
the PDB API.
* app/paint/gimppaintcore.c (gimp_paint_core_get_color_from_gradient):
check that gradient_length > 0.0 before dividing by it.
* plug-ins/gfig/gfig.c (gfig_paint_callback): push an undo group
around the paint operations (bug #110446).
2003-03-25 Sven Neumann <sven@gimp.org>
* Makefile.am
* gimpintl.h: removed this header file.
* gimpmiscui.c: include libgimp-intl.h.
* gimp.c (gimp_main): call setlocale() and bind to the libgimp
textdomain so that plug-ins don't need to do that explicitely.
* libgimp/stdplugins-intl.h: added the functionality that used to
live in gimpintl.h and removed the libgimp related stuff. Got rid
of the INIT_I18N_UI() macro.
* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
Plug-ins simply call INIT_I18N() once in their run() function.
* plug-ins/script-fu/script-fu-intl.h: added the functionality
that used to live in gimpintl.h and removed the libgimp related
stuff.
* app/Makefile.am
* app/gimp-intl.h: new file that defines the gettext macros for
the GIMP core.
* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.
* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-01-05 Manish Singh <yosh@gimp.org>
* many files in app, modules and libgimp*: cleanup, removed unecessary
G_OBJECT() casts. Should do the same for plug-ins, when more of them
get undeprecated.
2002-12-06 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.c: no need to include app_procs.h here.
* app/display/gimpdisplay-foreach.c (gimp_displays_dirty)
(gdisplays_check_valid): don't use the global the_gimp. Removed
inclusion of app_procs.h.
2002-11-12 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.c: check for NULL masks returned from
the brush scaler. Should fix crashes with buggy input devices.
Fix suggested by Jim Meyer <jim@dsdd.org> (#91067).
2002-06-17 Michael Natterer <mitch@gimp.org>
Separated tool_options creation from tool registration so we
don't implicitly create widgets before gui_init():
* libgimptool/gimptooltypes.h: removed GimpToolOptionsNewFunc
typedef here...
* app/core/core-types.h: ...and added it here.
* libgimpproxy/gimpproxytypes.h: regenerated.
* app/core/gimptoolinfo.[ch]: added a GimpToolOptionsNewFunc
pointer to remember the constructor. Fixed the finalize() method
(bug was never noticed because we leaked all tool infos)
* app/tools/tool_manager.[ch]: moved tool_options creation to the
new function tool_manager_restore(). Unref the tool infos after
adding them to their container. Added "brush" and "gradient" to
the context properties which are defined for tool contexts.
* app/app_procs.c: call tool_manager_restore() after gui_init().
* app/gui/gui.c: removed the hack introduced recently and call
render_setup() in gui_init() again, not in gui_themes_init().
Use the correct contexts now that they are properly initialized
at the time of tool_options creation:
* app/tools/gimpblendtool.c: use tool_info->context, not
gimp_get_user_context() to get/set the tool's gradient.
* app/paint/gimppaintcore.[ch] (gimp_paint_core_start): added a
GimpPaintOptions paramater and get the brush to use from
paint_options->context (instead of gimp_get_current_context()).
* app/paint/gimppaintcore-stroke.c
* app/tools/gimppainttool.c: changed accordingly.
* app/tools/paint_options.c: added a brush preview to the paint
options.
2002-06-12 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.[ch]: applied a patch from Henning
Makholm <henning@makholm.net> that vastly improves drawing of thin
lines. See bug #69773 for a detailed description.
2002-06-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: renamed gimp_drawable_apply_image()
to gimp_drawable_push_undo() because that's what it actually does.
* app/image_map.c
* app/core/gimpdrawable-offset.c
* app/core/gimpimage-mask.c
* app/core/gimpimage.c
* app/core/gimplayer.c
* app/paint/gimppaintcore.c
* app/tools/gimpinktool.c: changed accordingly. Removed redundant
comments because it's now obvious what the function does from
looking at its name.
* app/core/gimpdrawable.[ch]
* app/core/gimpimage.h: renamed "gboolean undo" parameters to
"gboolean push_undo".
2002-03-03 Michael Natterer <mitch@gimp.org>
Use gdouble in a [0.0..1.0] range for opacity values in the whole
core's API. Convert them using (opacity * 255.999) when passing
them to base/ and paint-funcs/
Affected functions:
* app/core/gimpchannel.[ch]: gimp_channel_[set|get]_opacity()
* app/core/gimpimage.[ch]: gimp_image_[apply|replace]_image()
* app/paint/gimppaintcore.[ch]: gimp_paint_core_[paste|replace]_canvas()
* app/core/core-types.h: added defines GIMP_OPACITY_TRANSPARENT
and GIMP_OPACITY_OPAQUE, just like the ones from
paint-funcs/paint-funcs-types.h
* app/gimprc.c
* app/image_map.c
* app/core/gimpcontext.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable.c
* app/core/gimpedit.c
* app/core/gimplayer.c
* app/core/gimplayer-floating-sel.c
* app/core/gimppalette.c
* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c
* app/tools/gimpinktool.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimppreview.c
* app/xcf/xcf-load.c: changed accordingly, use the new constants.
2002-03-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask-select.[ch]: changed
gimp_image_mask_select_channel() to not take "drawable" and
"sample_merged" parameters (which are silly in some contexts) but
simply the offsets of the passed channel.
* app/gui/channels-commands.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpiscissorstool.c: changed accordingly.
* app/tools/gimpdrawtool.[ch]: chaged gimp_draw_tool_draw_lines()
and _draw_strokes() to take an additional "use_offsets" parameter
like the other drawing functions.
* app/path_curves.c
* app/tools/gimpvectortool.c: changed accordingly.
* app/paint/gimppaintcore.c: removed #if 0'ed code which was
identical to other functions.
* app/tools/gimpselectiontool.c: use the GimpEditSelectionTool's
"arrow_key_func" so it's now possible to keyboad-move the current
layer and selection with all selection tool. Needs some more
tweaking...
* app/tools/gimpiscissorstool.[ch]
* app/tools/gimpvectortool.[ch]: derive them from GimpSelectionTool
to make the modifier key <-> tool options interaction work. Ported
IScissors to the new way the draw_tool works.
2002-02-23 Michael Natterer <mitch@gimp.org>
General undo cleanup:
* app/undo.[ch]: made all undo structs private. Changed all
undo_push_foo() functions to take useful parameters instead of
"gpointer foo_ptr" and create the undo structs internally.
Renamed lots of functions so they are more self-explanatory
(like undo_push_gimage_mod -> undo_push_image_size). Added some
undo functions (channel reordering is undoable now). Never pass
in a UndoType, as they are reseved for groups now (see below).
Lots of cleanup and stuff...
* app/undo_types.h: is a private header now which defines "enum
UndoImplType" which is reserved for actual undo operations.
All enum values are named "FOO_UNDO".
* app/core/core-types.h: added the "UndoType" enum here and don't
include "undo_types.h" any more. The UndoType values are all
named "FOO_UNDO_GROUP" and are reserved for undo groups.
The ID space of actual undo operations and undo groups
is now strictly disjunct.
* app/core/gimpchannel.h
* app/core/gimpimage.h
* app/core/gimplayer.h
* app/core/gimplayermask.h
* app/paint/gimppaintcore.h
* app/tools/gimptransformtool.h: removed undo stuct definitions.
* app/undo_history.c
* app/path_transform.h
* app/core/gimpchannel.c
* app/core/gimpdrawable-transform.c
* app/core/gimpedit.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-qmask.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-scale.c
* app/core/gimpimage.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/display/gimpdisplayshell-dnd.c
* app/gui/channels-commands.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/gui/paths-dialog.c
* app/paint/gimppaintcore.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c
* tools/pdbgen/pdb/guides.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/undo.pdb: changed accordingly.
* app/pdb/guides_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/undo_cmds.c: regenerated.
* app/core/gimpimage.[ch]: added infrastructure for holding a
GimpList of GimpVectors objects. The API is the same as for layers
and channels. Not used yet.
2002-02-21 Michael Natterer <mitch@gimp.org>
Made the paint tool PDB wrappers work again (a bit at least...)
* app/Makefile.am: changed linking order. libtool sucks.
* app/undo.c: check if active_tool is a GimpPaintTool before
casting it.
* app/paint/Makefile.am
* app/paint/paint-types.h: added new files/types.
* app/paint/gimppaintoptions.[ch]: new files cut out of
tools/paint_options.h. Prefixed everything with "Gimp". There is
still GtkWidget* cruft hanging around in the structs...
* app/paint/gimppaintcore-stroke.[ch]: utility function
which paints a stroke array. Needed for the PDB wrappers.
* app/paint/gimpairbrush.[ch]
* app/paint/gimpclone.[ch]
* app/paint/gimpconvolve.[ch]
* app/paint/gimpdodgeburn.[ch]
* app/paint/gimperaser.[ch]
* app/paint/gimppaintbrush.c
* app/paint/gimppaintcore.[ch]
* app/paint/gimppencil.c
* app/paint/gimpsmudge.[ch]: added *_options_new() functions which
create correctly initialized options structures without widgets.
* app/tools/paint_options.[ch]: removed the options struct
definitions and value initialisations.
* app/tools/gimpairbrushtool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpclonetool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpinktool.c
* app/tools/gimppaintbrushtool.c
* app/tools/gimppainttool.c
* app/tools/gimppenciltool.c
* app/tools/gimpsmudgetool.c: changed all paint_options functions
accordingly, s/PaintOptions/GimpPaintOptions/g etc., removed all
#if 0'ed non_gui functions.
* tools/pdbgen/pdb/paint_tools.pdb: use gimp_paint_core_stroke().
We currently leak all paint_options structs created by the PDB
wrappers, more stuff to come...
* app/pdb/paint_tools_cmds.c: regenerated.
2002-02-21 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.c: return the corrent value in
g_retuen_val_if_fail().
* app/tools/gimppainttool.c: removed some more painting logic...
* app/paint/gimppaintcore.[ch]: ...and added it here so the PDB
wrappers can use it too. Added "gboolean use_pressure" which needs
to be set by GimpPaintTool so we don't need access to GdkDevices.
2002-02-15 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-handlers.c: added back the handler
which invalidates the display_title on dirty/clean. Removing it
was simply wrong.
* app/display/gimpdisplayshell-scale.c: don't call
gimp_display_shell_update_title() directly but set
shell->title_dirty to TRUE before calling gdisplays_flush().
* app/paint/gimppaintcore.[ch]: added gimp_paint_core_constrain()
which does the "snap to 15 degrees" stuff formerly done in
GimpPaintTool. Call gimp_brush_select_brush() in
gimp_paint_core_paint() if paint_state == MOTION, not in several
other places. Reordered functions, added some comments and
documentation.
* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimppencil.c
* app/paint/gimpsmudge.c:
s/CORE_CAN_HANDLE_CHANGING_BRUSH/CORE_HANDLES_CHANGING_BRUSH/g,
minor cleanup.
* app/pdb/pdb-types.h: include "paint/paint-types.h"
* app/tools/gimppainttool.[ch]: use gimp_paint_core_constrain(),
removed paint_tool->state because it's not needed any more,
lots of cleanup.
* tools/pdbgen/app.pl: another eeky special case for "paint/".
* tools/pdbgen/pdb/paint_tools.pdb: include stuff from "paint/",
not "tools/".
* app/pdb/paint_tools_cmds.c: regenerated.
2002-02-14 Michael Natterer <mitch@gimp.org>
Core/UI separation for the paint tools:
* configure.in
* app/Makefile.am
* app/paint/.cvsignore
* app/paint/Makefile.am: added new directory for the paint methods
without GUI and tools around them.
* app/paint/paint-types.h: typedefs for this module.
* app/paint/gimppaintcore-kernels.h
* app/paint/gimppaintcore.[ch]: the general paint logic taken
from GimpPaintTool.
* app/paint/gimpairbrush.[ch]
* app/paint/gimpclone.[ch]
* app/paint/gimpconvolve.[ch]
* app/paint/gimpdodgeburn.[ch]
* app/paint/gimperaser.[ch]
* app/paint/gimppaintbrush.[ch]
* app/paint/gimppencil.[ch]
* app/paint/gimpsmudge.[ch]: subclasses of GimpPaintCore,
implementing their own paint() methods. Needs more hacking
to get the GtkWidget pointers out of the options structs.
* app/tools/gimppainttool_kernels.h: removed.
* app/tools/tools-types.h: removed the paint tool enums.
* app/tools/gimpairbrushtool.[ch]
* app/tools/gimpclonetool.[ch]
* app/tools/gimpconvolvetool.[ch]
* app/tools/gimpdodgeburntool.[ch]
* app/tools/gimperasertool.[ch]
* app/tools/gimppaintbrushtool.[ch]
* app/tools/gimppainttool.[ch]
* app/tools/gimppenciltool.[ch]
* app/tools/gimpsmudgetool.[ch]: all paint tools are pure GUI
things now. PaintOptions and friends still need to be chopped up
though...
* app/undo.c: changed PaintUndo to GimpPaintCoreUndo, some minor
cleanup.
* tools/kernelgen.c: changed accordingly.
* tools/pdbgen/Makefile.am: scan paint/paint-types.h for enums.
* tools/pdbgen/pdb/paint_tools.pdb: hardcode "success = FALSE" for
all paint PDB wrappers. The non-gui stuff is completely broken.
More commits to come...
* app/pdb/paint_tools_cmds.c
* tools/pdbgen/enums.pl: regenerated.
2002-02-13 Michael Natterer <mitch@gimp.org>
* app/tools/gimppainttool.[ch]: moved all global variables into
the GimpPaintTool structure so they have a proper lifecycle and
it's easier to move them to the upcoming GimpPaintCore (??)
object.
* app/tools/gimppainttool_kernels.h
* tools/kernelgen.c: s/SUBSAMPLE/KERNEL_SUBSAMPLE/
2002-02-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpobject.c: made the gimp_object_get_memsize()
debugging output configurable by a global "gimp_debug_memsize"
boolean.
* app/display/gimpdisplay.c: removed duplicated prototype.
* app/display/gimpdisplayshell.[ch]: renamed the various cursor
functions to be more consistent and shorter. Compress window title
updates by adding a "gboolean title_dirty" and updating the title
in gimp_display_shell_flush(). Added "%m" (memory size) to the
possible title string substitutions.
* app/display/gimpdisplay-foreach.c
* app/display/gimpdisplayshell-handlers.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptool.c: changed accordingly.
* app/display/gimpdisplayshell-callbacks.c: forgot to grab the
pointer when dragging guides from the rulers. Coincidentially,
this also fixes the buggy offset between guide and mouse
pointer...
Cleaned up the main tool event callback a but more.
* app/widgets/gimppreview.c
* app/gui/commands.c: set the new global "gimp_debug_memsize"
toggle to TRUE while calling gimp_object_get_memsize().
* app/gui/preferences-dialog.c: added a image title example
containing the new "%m" feature.
* docs/gimprc-1.3.5.in: document "%m" in the manpage.
* app/tools/gimpbezierselecttool.c: reordered some statements.
* app/tools/gimpdrawtool.[ch]: store the GimpDisplay passed to
gimp_draw_tool_start() in draw_tool->gdisp and use it for
coordinate transfomration. This way we can paint on a display
which is not tool->gdisp.
* app/tools/gimppainttool.c: changed the gimp_draw_tool_foo()
calls needed to make the straight_line preview work in a way
that does not interfere with paint_tool subclasses which want
to do their own drawing (like the clone tool).
Also changed the paint_tools PRETRACE_PAINT and POSTTRACE_PAINT
flags usage in a way that subclasses can use them without major
hackery: don't simply wrap gimp_display_flush_now() with
PRETRACE/POSTTRACE calls, but wrap the actual painting calls, so
subclasses are able to do useful things with paint_tool->*_coords.
* app/tools/gimpclonetool.c: removed poking around in draw_tool
internals and simply suspend()/resume() it in
PRETRACE_PAINT/POSTTRACE_PAINT to get the clone_src indicator
drawn correctly.