Commit Graph

116 Commits

Author SHA1 Message Date
Michael Natterer 882a8eca80 added default implementations for scale() and resize() which just set the
2003-05-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c: added default implementations for scale()
	and resize() which just set the resulting width/height and offset
	values.

	* app/core/gimpdrawable.c: chain up in scale() and resize().

	* app/vectors/gimpvectors.[ch]: buncha vectors changes/features:

	- Removed unused "linked" and "locked" members.
	- Removed "changed" signal.
	- Added "freeze" and "thaw" signals and functions to emit them.
	- Added "freeze_count" member so we emit only one freeze/thaw pair
	  even when doing nested changes.
	- Added GimpItem::translate() implementation.
	- Actually scale and resize the vectors in scale() and resize().
	- Added undo for scale() and resize().
	- Added freeze()/thaw() pairs around all modifying functions.
	- Changed gimp_vectors_copy_strokes() to work as needed.

	* app/core/gimpimage-resize.c
	* app/core/gimpimage-scale.c: resize and scale all vectors.
	Fixes bug #36491.

	* app/core/gimpimage-undo-push.c (undo_pop_vectors_mod): added
	freeze()/thaw() around the vectors-modifying code. Also restore
	width, height and offsets.

	* app/tools/gimpvectortool.c: connect to "freeze" and "thaw"
	and pause()/resume() vectors drawing accordingly.
2003-05-09 00:38:51 +00:00
Michael Natterer 766930db38 added width, height, offset_x and offset_y parameters.
2003-05-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch] (gimp_item_configure): added width,
	height, offset_x and offset_y parameters.

	* app/core/gimpdrawable.c
	* app/vectors/gimpvectors.c: changed accordingly.

	* app/tools/gimpfliptool.c: removed unused variable.
2003-05-08 14:21:39 +00:00
Michael Natterer 7442ef5099 forgot to commit this one.
2003-05-07  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpvectors.c: forgot to commit this one.
2003-05-07 14:45:26 +00:00
Michael Natterer 2a17435e7e Started to abstract item transformation so we can easily transform
2003-05-07  Michael Natterer  <mitch@gimp.org>

	Started to abstract item transformation so we can easily
	transform multiple linked items later:

	* app/core/gimpitem.[ch]: added new virtual function
	GimpItem::scale() with the same signature as the former
	gimp_layer_scale_lowlevel().

	* app/core/gimpdrawable.c: implement scale() and do the
	common parts of layer/channel scaling here.

	* app/core/gimpchannel.[ch]
	* app/core/gimplayer.[ch]: implement scale() for the
	channel/layer specific parts of scaling.

	* app/core/gimplayer.[ch]: renamed gimp_layer_scale() to
	gimp_layer_scale_by_origin().

	* app/vectors/gimpvectors.c: added empty scale() implementation.

	* app/core/gimpimage-scale.c
	* app/core/gimpimage-undo-push.c
	* app/gui/layers-commands.c
	* tools/pdbgen/pdb/layer.pdb: changed accordingly.

	* app/pdb/layer_cmds.c: regenerated.

	Unrelated:

	* app/core/gimpimage-undo-push.c: fixed item rename undo to
	take the size of the saved name into account. Removed old
	path_undo stuff.
2003-05-07 11:09:00 +00:00
Michael Natterer 8c6159c41d made "changed" a real signal, don't crash when iterating a NULL stroke
2003-04-14  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpvectors.[ch]: made "changed" a real signal,
	don't crash when iterating a NULL stroke list, cleanup.
2003-04-14 14:46:34 +00:00
Simon Budig 740983b06f app/vectors/gimpstroke.[ch] Changed vectors->strokes to a GList and
2003-04-14  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpvectors.[ch]: Changed vectors->strokes to a
        GList and removed stroke->next. Implemented stuff for duplicating
        strokes. Duplicating a vector works now.

        * app/tools/gimpvectortool.c: added not-yet-used function to
        determine where a click has been. Refcounting stuff changed.

        * app/core/gimpimage-mask-select.c
        * app/paint/gimppaintcore-stroke.c: Changed accordingly.
2003-04-14 00:37:04 +00:00
Sven Neumann 28fddfd554 Makefile.am removed this header file.
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-03-25 16:38:19 +00:00
Michael Natterer 418c5997f4 added virtual function rename() which pushes an item rename undo. Added
2003-03-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added virtual function rename() which
	pushes an item rename undo. Added "default_name" and "rename_desc"
	to the GimpItemClass struct which are used as default values.

	* app/core/gimplayer.c: implement it and special-case floating
	selections. set item_clas->default_name and item_class->rename_desc.

	* app/core/gimpchannel.c
	* app/vectors/gimpvectors.c: set item_class->default_name and
	item_class->rename_desc.

	* app/widgets/gimpitemtreeview.[ch]: removed rename_item() virtual
	function and call gimp_item_rename().

	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpvectorstreeview.c: changed accordingly.
2003-03-17 00:14:59 +00:00
Michael Natterer 436ed648e8 added new virtual function duplicate() as replacement for all
2003-02-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added new virtual function duplicate()
	as replacement for all gimp_*_copy() functions.

	* app/core/gimpchannel.[ch]
	* app/core/gimpdrawable.[ch]
	* app/core/gimplayer.[ch]
	* app/core/gimplayermask.[ch]
	* app/vectors/gimpvectors.[ch]: replaced public copy() functions
	by duplicate() implementations.

	* app/text/gimptextlayer.c: added a duplicate() implementation.

	* app/widgets/gimpitemlistview.[ch]: removed the "copy_item_func"
	and simply call gimp_item_duplicate().

	* app/undo.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-mask.c
	* app/core/gimpimage-qmask.c
	* app/gui/channels-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/layers-commands.c
	* app/gui/vectors-commands.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/selection.pdb: changed accordingly.

	* app/pdb/channel_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/selection_cmds.c: regenerated.
2003-02-11 13:52:47 +00:00
Michael Natterer 794885e297 added gimp_item_configure() and gimp_item_copy().
2003-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added gimp_item_configure() and
	gimp_item_copy().

	* app/core/gimpdrawable.c (gimp_drawable_configure,copy): use them.

	* app/vectors/gimpvectors.[ch]: added gimp_vectors_new(),
	gimp_vectors_copy() and gimp_vectors_copy_points(). Use the new
	GimpItem functions just as GimpDrawable does. Added a
	get_memsize() implementation.

	* app/vectors/gimpstroke.[ch]: made it a GimpObject and added
	a get_memsize() implementation.

	* app/undo.c: implemented vectors undo as if the new GimpVectors
	functions above worked.

	* app/gui/dialogs-constructors.c
	* app/gui/vectors-commands.c
	* app/tools/gimpvectortool.c: use gimp_vectors_new,copy().
2003-01-31 18:08:32 +00:00
Manish Singh 1a44f2126c cleanup, removed unecessary G_OBJECT() casts. Should do the same for
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.
2003-01-05 22:07:10 +00:00
Michael Natterer cdf2a90b03 app/core/Makefile.am app/core/core-types.h new base class for something
2002-02-25  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpitem.[ch]: new base class for something which is a
	child of an image, has a PDB ID, a tattoo, parasites and emits
	a "removed" signal.

	* app/core/gimpdrawable.[ch]
	* app/vectors/gimpvectors.[ch]: derive from GimpItem. Removed
	lots of stuff from GimpDrawable.

	* app/core/gimp.[ch]: changed gimp->drawable_table and
	gimp->next_drawable_ID to gimp->item_table and gimp->next_item_id.

	* app/undo.[ch]: s/undo_push_drawable_parasite/undo_push_item_parasite/,
	minor cleanups.

	* app/core/gimplayer.[ch]: changed gimp_layer_new_from_tiles() and
	gimp_layer_new_from_drawable() to take the "dest_gimage" as
	second, not first parameter.

	* app/image_map.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-histogram.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpedit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-mask.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-pick-color.c
	* app/core/gimpimage.c
	* app/core/gimplayer-floating-sel.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-save.c
	* app/gui/channels-commands.c
	* app/gui/file-save-dialog.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/paths-dialog.c
	* app/gui/toolbox.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/gimppaintcore.c
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c
	* app/plug-in/plug-in.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimppainttool.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* app/widgets/gimpdrawablepreview.c: changed accordingly.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpitemlistview.[ch]: new widget implementing most
	of the stuff formerly done by GimpDrawableListView.

	* app/widgets/gimpchannellistview.c
	* app/widgets/gimpdrawablelistitem.c
	* app/widgets/gimpdrawablelistview.[ch]
	* app/widgets/gimplayerlistview.c: changed accordingly.

	* app/widgets/gimpdnd.[ch]: added a vectors DND type.

	* app/gui/menus.c
	* app/gui/dialogs.c
	* app/gui/dialogs-constructors.[ch]: added a vectors dialog and
	a vectors item_factory.

	* app/gui/Makefile.am
	* app/gui/vectors-commands.[ch]: new files implementing the
	callbacks for the new vectors dialog and item_factory.

	* app/pdb/pdb_glue.h: some more ugly hacks to keep intermediate
	perl code working...

	* tools/pdbgen/pdb.pl: added a vectors type, use GimpItem for all
	ID lookups.

	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/misc_tools.pdb
	* tools/pdbgen/pdb/parasite.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb: misc changes according to
	stuff above.

	* app/pdb/channel_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/misc_tools_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/parasite_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/selection_tools_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2002-02-25 17:58:50 +00:00
Simon Budig 7112b2068f app/vectors/gimpbezierstroke.c app/tools/gimpvectortool.[ch]
2002-02-25  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpbezierstroke.c
        * app/tools/gimpvectortool.[ch]
        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpvectors.[ch]: Fixed various bugs, *including*
        the nasty one from this morning (thanks Mitch).
2002-02-25 16:57:19 +00:00
Michael Natterer 619c9a947c app/vectors/Makefile.am new files creating dummy vectors previews.
2002-02-25  Michael Natterer  <mitch@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/gimpvectors-preview.[ch]: new files creating dummy
	vectors previews.

	* app/vectors/gimpvectors.[ch]: added a "gimage" pointer.

	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpstroke.c: some object stuff fixes.
2002-02-25 13:39:34 +00:00
Simon Budig 29b8063356 app/vectors/gimpvectors.c Changed to a container of GimpStrokes. This will
2002-02-25  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpvectors.c
        * app/vectors/gimpvectors.h: Changed to a container of
        GimpStrokes. This will enable it to contain different
        Stroke-types in one Vectors-Object (think Entry in path
        dialog)

        * app/vectors/gimpstroke.c
        * app/vectors/gimpstroke.h
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpbezierstroke.h: New Objects: A connected
        component in a vector.

        * app/vectors/gimpbezier.c
        * app/vectors/gimpbezier.h: Removed, obsoleted by gimpstroke
        and gimpbezierstroke.

        * app/tools/gimpvectortool.c
        * app/vectors/Makefile.am
        * app/vectors/vectors-types.h
        * app/vectors/gimpanchor.h: Changed accordingly.

        There is a nasty bug I am yet unable to find in the tool.
        Don't use it. For some reason a wrong function instead of
        gimp_stroke_real_anchor_get_next gets called. I have *no*
        idea, whats wrong here. I stared at the code for hours.

        If somebody has an idea I'd appreciate a hint.
2002-02-25 03:16:41 +00:00
Simon Budig a7fcc25f10 app/vectors/Makefile app/vectors/Makefile.am app/vectors/Makefile.in
2002-02-22  Simon Budig  <simon@gimp.org>

        * app/vectors/Makefile
        * app/vectors/Makefile.am
        * app/vectors/Makefile.in
        * app/vectors/gimpanchor.h
        * app/vectors/gimpbezier.c
        * app/vectors/gimpbezier.h
        * app/vectors/gimpvectors.c
        * app/vectors/gimpvectors.h
        * app/vectors/vectors-types.h: new files, the beginning
        of a new vector infrastructure for gimp.

        * configure.in
        * app/Makefile.am
        * app/core/core-types.h: changed accordingly.

        * app/tools/Makefile.am
        * app/tools/gimpvectortool.c
        * app/tools/gimpvectortool.h
        * app/tools/tools.c: New tool without practical use (yet),
        using the new infrastructure.

        to be continued...
2002-02-22 00:11:37 +00:00