Commit Graph

84 Commits

Author SHA1 Message Date
Sven Neumann 5d7931db74 changed all transform utilities to modify the passed transform matrix
2005-03-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-utils.[ch]: changed all transform
	utilities to modify the passed transform matrix instead of
	creating a new one.

	* app/text/gimptextlayer-transform.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: changed accordingly.

	* app/pdb/drawable_transform_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2005-03-21 19:10:11 +00:00
William Skaggs 07fa3011f3 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/vectors/gimpvectors-warp.c
	* app/vectors/gimpvectors-warp.h: new files implmenting
	"path along a path" functionality.

	* app/vectors/Makefile.am: new stuff added

	* gimp/app/vectors/gimpvectors.[ch]: actually implement
	gimp_vectors_real_stroke_get_length().

	* app/tools/gimptexttool.c
	* app/tools/gimptextoptions.c: first pass at "text
	along a path", using new functions.  See bug #169616.
2005-03-09 16:58:54 +00:00
Michael Natterer e5c0d8eb0e app/core/gimpitem.c app/core/gimpdrawable.c made GimpItem::scale() and
2005-01-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c
	* app/core/gimpdrawable.c
	* app/vectors/gimpvectors.c: made GimpItem::scale() and ::resize()
	work on unattached items.

	* app/widgets/gimplayertreeview.c
	(gimp_layer_tree_view_drop_component): fix drop index.

	* app/widgets/gimpchanneltreeview.c: implement dropping of
	components as new channels. Fixes bug #158483.
2005-01-15 19:17:11 +00:00
Michael Natterer 4e942377e6 Splitting GimpItem::convert() into two virtual functions was apparently
2005-01-13  Michael Natterer  <mitch@gimp.org>

	Splitting GimpItem::convert() into two virtual functions was
	apparently buggy over-engineering. Reverted that stuff and
	implement item conversion much simpler:

	* app/core/gimpitem.[ch]: have a single virtual function,
	GimpItem::convert(), which takes a newly duplicated item and the
	destination image.

	(gimp_item_convert): simply call GimpItem::convert() on the result
	of gimp_item_duplicate().

	(gimp_item_real_convert): set the item's new image.

	* app/core/gimplayer.c (gimp_layer_convert)
	* app/vectors/gimpvectors.c (gimp_vectors_convert): changed
	accordingly and chain up after, not before doing our own stuff
	so the old image is still available as item->image for stuff
	like colormap conversion. Fixes bug #163879.
2005-01-13 18:17:24 +00:00
Michael Natterer 0527989edf Item conversion depends on the old *and* the new item type, so it can't
2004-12-23  Michael Natterer  <mitch@gimp.org>

	Item conversion depends on the old *and* the new item type, so
	it can't live in the old item's vtable only:

	* app/core/gimpitem.[ch]: split GimpItem::convert() into
	GimpItem::convert_from() (which is called on the old item and
	creates the new item) and GimpItem::convert_to() (which is called
	on the new item). This way functions from the old *and* new items'
	vtables are called and it's possible to convert between item types
	which live on different branches of the class hierarchy or to item
	types which live further down the class tree than the old item.

	(gimp_item_convert): call ::convert_to() on the new item created
	by ::convert_from().

	* app/vectors/gimpvectors.c: changed ::convert() implementation
	to ::convert_from().

	* app/core/gimplayer.c: changed ::convert() to ::convert_to().
	Fixes bug #161877.
2004-12-23 11:53:14 +00:00
Simon Budig a02853409e Fixed stupid typo that caused distorted vectors on scaling after resizing.
2004-12-02  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors.c: Fixed stupid typo that caused
	distorted vectors on scaling after resizing. Spotted by
	Joao S. O. Bueno.

	Fixes bug #157852.
2004-12-02 09:22:12 +00:00
Michael Natterer 06447c00c2 added new enum GimpStrokeMethod which can be one of { LIBART, PAINT_CORE
2004-10-22  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: added new enum GimpStrokeMethod which
	can be one of { LIBART, PAINT_CORE }.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpstrokedesc.[ch]: new object which encapsulates
	the params and setup logic for the different stroke methods.

	* app/core/gimpitem.[ch]: use it in GimpItem::stroke() and
	in the gimp_item_stroke() wrapper.

	* app/core/gimpchannel.c (gimp_channel_stroke)
	* app/core/gimpselection.c (gimp_selection_stroke)
	* app/vectors/gimpvectors.c (gimp_vectors_stroke): changed accprdingly.

	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/dialogs/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: use GimpStrokeDesc. Simplifies the
	code quite a bit.

	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c: regenerated.
2004-10-22 12:32:31 +00:00
Michael Natterer 9e76c5a4bc added "GimpPaintInfo *paint_info" member and construct property. Changed
2004-08-31  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintoptions.[ch]: added "GimpPaintInfo *paint_info"
	member and construct property. Changed gimp_paint_options_new()
	to take only a GimpPaintInfo parameter.

	* app/core/gimpitem.c (gimp_item_stroke)
	* app/core/gimppaintinfo.c (gimp_paint_info_new): changed accordingly.

	* app/core/gimpchannel.c (gimp_channel_stroke)
	* app/vectors/gimpvectors.c (gimp_vectors_stroke): use
	paint_options->paint_info->paint_type directly instead of casting
	to GimpToolOptions and using
	tool_options->tool_info->paint_info->paint_type (eek). Fixes crash
	when stroking via the PDB because newly created GimpToolOptions
	instances have no "tool_info" pointer yet.

	* tools/pdbgen/pdb/paint_tools.pdb: changed all paint PDB wrappers
	accordingly.

	* app/pdb/paint_tools_cmds.c: regenerated.
2004-08-31 13:20:57 +00:00
Michael Natterer f1d0db6d99 removed "gboolean use_default_values" from GimpItem::stroke().
2004-08-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: removed "gboolean use_default_values"
	from GimpItem::stroke().

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c: changed accordingly.
2004-08-26 16:33:42 +00:00
Michael Natterer 23bd12162d implement the whole paint_options fiddling here instead of in each
2004-08-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c (gimp_item_stroke): implement the whole
	paint_options fiddling here instead of in each subclass and pass
	either GimpStrokeOptions or GimpPaintOptions (instead of
	GimpStrokeOptions or GimpPaintInfo) to GimpItem::stroke().

	Also copied code (that needs to be abstracted to a utility
	function) from the tool_manager which makes sure we really use the
	global brush, pattern etc. if these options are checked in prefs.
	Fixes bug #150716.

	* app/core/gimpchannel.c (gimp_channel_stroke)
	* app/vectors/gimpvectors.c (gimp_vectors_stroke): removed the
	duplicated code mentioned above and simply use the paint_options
	passed.
2004-08-26 16:06:13 +00:00
Michael Natterer 02d2b990f5 Redid the whole internal progress stuff: don't pass around
2004-08-10  Michael Natterer  <mitch@gimp.org>

	Redid the whole internal progress stuff: don't pass around
	progress_callback and progress_data; instead, provide a
	pointer to a GimpProgressInterface which can be implemented
	by a variety of backends.

	Addresses (but not yet fixes) bugs #6010, #97266 and #135185.

	* app/display/Makefile.am
	* app/display/gimpprogress.[ch]: removed the old progress hack.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpprogress.[ch]: implement GimpProgressInterface.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpprogressdialog.[ch]: the standalone progress
	dialog as widget implementing GimpProgressInterface.

	* app/display/gimpdisplay.c
	* app/display/gimpstatusbar.[ch]
	* app/widgets/gimpfiledialog.[ch]
	* app/widgets/gimpthumbbox.[ch]: added GimpProgressInterface
	implementation to these classes.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: replaced the old progress vtable entries
	by two new to create and destroy a GimpProgressDialog in case
	no other progress is available.

	* app/pdb/procedural_db.[ch]
	* app/plug-in/plug-in-run.[ch]
	* tools/pdbgen/app.pl: pass a GimpProgress to all PDB wrappers and
	all plug-ins.

	* app/plug-in/plug-in.[ch]
	* app/plug-in/plug-ins.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c: handle the case there the
	plug-in was crated with a progress as well as the case where it
	wasn't.

	* app/app_procs.c
	* app/batch.c
	* app/xcf/xcf.c
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/widgets/gimphelp.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c: changed accordingly.

	* app/core/gimpimagefile.[ch]
	* app/display/gimpdisplayshell-dnd.c
	* app/gui/file-open-dialog.c
	* app/gui/file-open-location-dialog.c
	* app/gui/file-save-dialog.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c: pass a GimpProgress to all file
	related functions. Embed the progress in the file dialog where
	possible.

	* app/core/gimpdrawable-blend.[ch]
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpimage-convert.[ch]
	* app/core/gimpimage-flip.[ch]
	* app/core/gimpimage-resize.[ch]
	* app/core/gimpimage-rotate.[ch]
	* app/core/gimpimage-scale.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c: replaced callback/data by GimpProgress.

	* app/tools/gimpblendtool.c
	* app/tools/gimptransformtool.c
	* app/gui/convert-dialog.c
	* app/actions/documents-commands.c
	* app/actions/file-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb: changed callers accordingly.

	* app/pdb/*_cmds.c: regenerated.
2004-08-10 18:47:21 +00:00
Michael Natterer f41e1ff5d0 added "const gchar *stroke_desc" to the GimpItemClass struct and always
2004-04-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added "const gchar *stroke_desc" to
	the GimpItemClass struct and always push an undo group
	around GimpItem::stroke().

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c: set the stroke_desc accordingly
	and don't push undo groups.

	* app/text/gimptextlayer.c (gimp_text_layer_class_init): set
	all of GimpItemClass' undo_descs.

	* app/text/gimptextlayer-transform.c: don't push undo groups here.
2004-04-15 14:41:36 +00:00
Michael Natterer 837fa4294d Context cleanup continued:
2004-04-15  Michael Natterer  <mitch@gimp.org>

	Context cleanup continued:

	* app/core/gimpitem.[ch]: added context parameter to
	GimpItem::stroke().

	* app/core/gimpchannel.c (gimp_channel_stroke)
	* app/vectors/gimpvectors.c (gimp_vectors_stroke): use it to get
	default values from instead of gimp_get_user_context().

	* app/core/gimpselection.c
	* app/gui/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly.

	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c: regenerated.

	* app/plug-in/plug-in.[ch]: added GimpContext member to the PlugIn
	struct. Added context parameter to plug_in_new(),
	plug_in_call_query() and plug_in_call_init().

	* app/plug-in/plug-in-run.[ch]: added context parameters to
	plug_in_run() and plug_in_repeat().

	* app/gui/plug-in-commands.c
	* app/gui/vectors-commands.c
	* app/pdb/procedural_db.c
	* app/widgets/gimphelp.c: pass a context to plug_in_run() and
	plug_in_repeat().

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): call
	procedures with the plug-in's context.

	* app/plug-in/plug-ins.c: use a temporary context for running the
	plug-ins' query() and init() functions. Use the same context for
	running automatic extensions. This temporarily separates the main
	Script-Fu extension from the user context (i.e. scripts have no
	way of setting/getting the global FG, BG, brush etc.).
2004-04-15 13:10:51 +00:00
Michael Natterer 18d9161eea Get rid of the "current_context" which was in fact just a bunch of global
2004-04-15  Michael Natterer  <mitch@gimp.org>

	Get rid of the "current_context" which was in fact just a bunch of
	global variables. Instead, pass the needed context all the way
	from the GUI and the PDB to the core. This is a prerequisite for
	macro recording and generally helps separating the various
	subsystems from each other. Work in progress...

	* app/core/gimp.[ch]: removed member "current_context" and
	gimp_[get|set]_current_context().

	* app/core/gimp-edit.[ch]
	* app/core/gimpdrawable-blend.[ch]
	* app/core/gimpdrawable-bucket-fill.[ch]
	* app/core/gimpdrawable-offset.[ch]
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpimage-crop.[ch]
	* app/core/gimpimage-flip.[ch]
	* app/core/gimpimage-merge.[ch]
	* app/core/gimpimage-resize.[ch]
	* app/core/gimpimage-rotate.[ch]
	* app/core/gimpimage.[ch]
	* app/core/gimpimagefile.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.[ch]
	* app/core/gimpselection.[ch]
	* app/core/gimptemplate.[ch]
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/pdb/procedural_db.[ch]
	* app/text/gimptext-compat.[ch]
	* app/text/gimptextlayer-transform.[ch]
	* app/gui/brush-select.[ch]
	* app/gui/font-select.[ch]
	* app/gui/gradient-select.[ch]
	* app/gui/palette-select.[ch]
	* app/gui/pattern-select.[ch]: added tons of "GimpContext *context"
	parameters and use the passed context instead of
	gimp_get_current_context().

	* app/app_procs.c
	* app/batch.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-ins.c
	* app/text/gimptextlayer.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors.c
	* app/gui/convert-dialog.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/select-commands.c
	* app/gui/vectors-commands.c
	* app/widgets/gimpdnd.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpthumbbox.c: pass gimp_get_user_context() or
	GIMP_CONTEXT(tool_options) or whatever is the right context
	to the changed core functions.

	* tools/pdbgen/app.pl: pass "GimpContext *context" to all
	generated PDB invokers.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: pass the new context
	parameter to the changed core functions.

	* app/pdb/*_cmds.c: regenerated.
2004-04-14 23:37:34 +00:00
Michael Natterer 069489fb71 GimpItem undo group cleanup in preparation of fixing bug #138356:
2004-04-13  Michael Natterer  <mitch@gimp.org>

	GimpItem undo group cleanup in preparation of fixing bug #138356:

	* app/core/core-enums.[c]: renamed LAYER_SCALE and LAYER_RESIZE
	undo groups to ITEM_SCALE and ITEM_RESIZE.

	* app/core/gimpitem.[ch]: always push undo groups around
	GimpItem::translate(), scale(), resize(), flip(), rotate() and
	transform(). Added the resp. undo_desc strings to GimpItemClass.

	* app/core/gimpchannel.[ch]
	* app/core/gimpdrawable.[ch]
	* app/core/gimplayer.c: removed all undo groups from
	implementations of the above methods. Removed the undo_desc
	strings which were moved to GimpItemClass.

	* app/core/gimpimage-crop.c
	* app/core/gimpselection.c
	* app/gui/layers-commands.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/layer.pdb: changed accordingly.

	* app/pdb/layer_cmds.c: regenerated.
2004-04-13 11:43:27 +00:00
Michael Natterer 2498c6659e Completed the fix for bug #136702:
2004-03-13  Michael Natterer  <mitch@gimp.org>

	Completed the fix for bug #136702:

	* app/core/gimpitem.[ch]: added "gboolean supersample" and
	"gint recursion_level" to GimpItem::transform().

	* app/core/gimpitem-linked.[ch]	(gimp_item_linked_transform): ditto.

	* app/core/gimpdrawable-transform.[ch]: added "recursion_level"
	parameters and removed the RECURSION_LEVEL #define.

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

	* app/tools/gimptransformoptions.[ch]: added new property
	"recursion_level" which is not serializable and has no GUI. Pretty
	useless, but it's IMHO better to hardcode the default value here
	than in gimpdrawable-transform.c

	* app/tools/gimptransformtool.c: changed accordingly.

	* tools/pdbgen/pdb/transform_tools.pdb: hardcode "recursion_level"
	to 3.

	* app/pdb/transform_tools_cmds.c: regenerated.
2004-03-13 17:45:58 +00:00
Simon Budig d765998230 fixed offset handling. Vectors objects always have 0,0 as offsets and
2004-03-03  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors.c: fixed offset handling. Vectors
	objects always have 0,0 as offsets and image->width,
	image->height as their dimensions.

	Fixes bug #135994.
2004-03-03 13:32:49 +00:00
Sven Neumann 1359960a56 added progress callback pointers to gimp_item_scale() and its variants.
2004-02-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.[ch]: added progress callback pointers to
	gimp_item_scale() and its variants.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-scale.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/gui/layers-commands.c97999
	* app/paint-funcs/paint-funcs.[ch]
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/layer.pdb: changed accordingly. Fixes bug #97999.

	* app/pdb/layer_cmds.c: regenerated.
2004-02-09 00:09:20 +00:00
Sven Neumann b49e39e8ed app/core/gimpchannel.c app/tools/gimptexttool.c app/vectors/gimpvectors.c
2004-02-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/widgets/gimpbufferview.c: removed double semicolons.
2004-02-04 16:52:35 +00:00
Michael Natterer 748d432f3a removed gimp_image_owns_item() again.
2004-01-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: removed gimp_image_owns_item() again.

	* app/core/gimpitem.[ch]: instead, added new virtual function
	GimpItem::is_attached().

	* app/core/gimpchannel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c: implement it.

	* app/core/gimp-edit.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimplayer-floating-sel.c
	* app/text/gimptext-compat.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb_ changed accordingly.

	* app/pdb/edit_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2004-01-26 16:18:16 +00:00
Michael Natterer f3c91918de added "gboolean use_default_values" to GimpItem::stroke().
2004-01-22  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added "gboolean use_default_values"
	to GimpItem::stroke().

	* app/core/gimpselection.c: changed accordingly.

	* app/core/gimpchannel.c
	* app/vectors/gimpvectors.c: if use_default_values is TRUE, don't
	use the GimpPaintOptions passed in the GimpPaintInfo, but create a
	new one.

	* app/gui/stroke-dialog.c: pass FALSE so the values as set in the
	tool options are used.

	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE so tool options settings
	don't affect PDB stroke calls. Fixes part 2 of bug #132145.

	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c: regenerated.
2004-01-22 00:16:49 +00:00
Sven Neumann fd30d5c976 app/config/gimpbaseconfig.h use gint64 for all memsize properties.
2003-11-16  Sven Neumann  <sven@gimp.org>

	* app/config/gimpbaseconfig.h
	* app/config/gimpcoreconfig.h: use gint64 for all memsize properties.

	* app/base/tile-manager.[ch] (tile_manager_get_memsize): since
	tiles can be swapped out, a tilemanager can be larger than gsize
	(on 32bit platforms). Use a gint64 to avoid an overflow.

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage-undo.[ch]
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimpitemundo.[ch]
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimpobject.[ch]
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c: use gint64 for gimp_object_get_memsize()
	and all its implementations.

	* app/display/gimpdisplayshell-title.c
	* app/gui/info-window.c: changed accordingly.
2003-11-16 17:51:36 +00:00
Simon Budig 795698e311 New vectors now are invisible by default. A quick poll on #gimp revealed
2003-11-11 Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors.c: New vectors now are invisible by
	default. A quick poll on #gimp revealed that this is more
	useful. Also loading images with compatibility paths works
	more as expected.
2003-11-10 23:28:56 +00:00
Simon Budig 31f7e362ac New function that appends a duplicate of the source vectors strokes to the
2003-11-07 Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors.[ch]: New function that appends a
	duplicate of the source vectors strokes to the list of strokes
	of a target vectors object.

	* app/core/gimpimage-merge.[ch]
	* app/core/core-enums.h: Use this new function to merge
	the visible vectors in an Image. New Undo type for vectors merging.

	* app/core/core-enums.c: regenerated.

	* app/gui/vectors-menu.c
	* app/gui/vectors-commands.[ch]
	* app/widgets/gimphelp-ids.h: New Menu entry + callback to invoke
	the merge functionality. New Help ID for the menu entry.
2003-11-07 13:20:52 +00:00
Sven Neumann 69f7bd131c app/core/Makefile.am added small wrappers to ease handling of image units
2003-10-01  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpimage-unit.[ch]: added small wrappers to ease
	handling of image units and to hide the core GimpUnit API.

	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpstatusbar.c
	* app/gui/info-window.c:
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimpscaletool.c: use the new functions.

	* app/core/gimp-units.c
	* app/vectors/gimpvectors-export.c: use the core GimpUnit API.

	* app/vectors/gimpvectors.c: no need to include gimpunit.h here.
2003-10-01 17:32:14 +00:00
Michael Natterer d0e1c1c661 cleanup.
2003-09-30  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore-stroke.c: cleanup.

	(gimp_paint_core_stroke_boundary): don't push a separate undo
	for each part of the boundary.

	* app/core/gimpdrawable-stroke.[ch]: added empty stub
	gimp_drawable_stroke_boundary(). Changed
	gimp_drawable_stroke_vectors() to take the GimpStrokeOptions as
	second parameter.

	* app/core/gimpchannel.c (gimp_channel_stroke): use it. No need
	to push an undo group around gimp_paint_core_stroke_boundary().

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

	* app/widgets/gimpselectioneditor.[ch]: added a GimpStrokeItemFunc
	pointer and use it for stroking.

	* app/gui/edit-commands.[ch] (edit_stroke_selection): a
	GimpStrokeItemFunc which strokes the selection using the
	stroke-dialog.

	* app/gui/dialogs-constructors.c: use it for the selection editor.
2003-09-30 02:44:17 +00:00
Simon Budig 7c3b455924 "The last of the Oldenburg commits"
2003-09-28  Simon Budig  <simon@gimp.org>

	"The last of the Oldenburg commits"

	Thanks to the team of the Oldenburg Linux Developers Meeting 2003
	for providing a nice hacking environment.

	* app/vectors/gimpvectors.c: Add a default stock_id.

	* app/widgets/gimppreviewrenderervectors.[ch]: New Widget
	to render the preview of vectors. Just renders a stock item
	now, since I was unable to figure out how to properly draw
	in the GtkWidget.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h: Changed accordingly.

	* app/widgets/gimppreviewrenderer-utils.c: Use the new widget.

	* app/core/gimpscanconvert.c
	* app/core/gimpdrawable-stroke.c: Use higher prescision for
	libart-stroking vectors. Reduces artefacts.

	* app/pdb/paths_cmds.c
	* libgimp/gimppaths_pdb.c: Regenerated after Tors changes.
2003-09-28 04:00:50 +00:00
Simon Budig ee3394754b changed the API of gimp_drawable_stroke_vectors to accept
2003-09-27  Simon Budig  <simon@gimp.org>

	* app/core/gimpdrawable-stroke.[ch]: changed the API of
	gimp_drawable_stroke_vectors to accept GimpStrokeOptions
	instead of lots of individual parameters.

	* app/vectors/gimpvectors.c: changed accordingly.
2003-09-27 15:29:21 +00:00
Sven Neumann b2a6cddcfb added unit properties for stroke width and dashes. Use convenience macros
2003-09-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: added unit properties for
	stroke width and dashes. Use convenience macros from GimpConfig to
	register the properties. Removed init function since all values
	are construct properties.

	* app/vectors/gimpvectors.c: respect the stroke width unit.

	* app/widgets/gimpstrokeeditor.c: added a unit menu here.
2003-09-27 14:58:46 +00:00
Simon Budig 3f76868aee This still is very much in progress. I just want to commit this to avoid
2003-09-27  Simon Budig  <simon@gimp.org>

	This still is very much in progress. I just want to commit this
	to avoid lossage. It kind of works but there definitely is
	code in the wrong place now.

	* app/gui/stroke-dialog.[ch]: New files implementing a dialog
	containing Svens GimpStrokeEditor-Widget.

	* app/gui/Makefile.am: changed accordingly.

	* app/gui/vectors-commands.c: Open the StrokeOptions-Dialog when
	the "stroke" menu entry gets selected.

	* app/vectors/gimpvectors.c: Remove bad #ifdef hacks and use
	Libart/Paintcore-Stroking depending on the type of the stroke_desc
	Parameter.

	* app/core/gimpstrokeoptions.c: Proper handle the Enum-Properties.

	* app/core/gimpscanconvert.[ch]: make the antialias-parameter
	to gimp_scan_convert_new a gboolean.

	* app/tools/gimpiscissorstool.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpimage-mask-select.c: Changed accordingly.
2003-09-27 02:34:18 +00:00
Simon Budig 10a5269e22 New Object, holding the Options for a Libart-Stroke.
2003-09-26  Simon Budig  <simon@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: New Object, holding the
	Options for a Libart-Stroke.

	* app/core/Makefile.am
	* app/core/core-types.h: Changed accordingly.

	* app/core/gimpitem.[ch]: Changed the Signature of
	gimp_item_stroke to accept a GimpObject instead of a
	GimpPaintInfo. This enables us to pass GimpStrokeOptions
	to it. To be cleaned up for 2.2.

	* app/core/gimpselection.c
	* app/core/gimpchannel.c
	* app/vectors/gimpvectors.c: Changed accordingly

	* app/gui/edit-commands.c
	* app/gui/vectors-commands.c
	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpvectorstreeview.c: Fixed warnings by
	casting the GimpPaintInfo to GimpObject.
2003-09-26 15:37:53 +00:00
Simon Budig 8172df9a15 Add some parameters to gimp_scan_convert_stroke () to expose the
2003-09-26  Simon Budig  <simon@gimp.org>

	* app/core/gimpscanconvert.[ch]: Add some parameters to
	gimp_scan_convert_stroke () to expose the Miter-Setting
	and enable dashing of vectors.

	* app/core/gimpdrawable-stroke.c: Use the dashing feature.

	* app/vectors/gimpvectors.c: Expose a bad hack (opacity
	controls the libart-stroke width) in a #define. Default
	is not enabled.
2003-09-26 00:41:10 +00:00
Simon Budig fa450f09b5 Previous commit got a broken pipe. 2003-09-21 19:09:56 +00:00
Sven Neumann 3ee7c4d0e0 renamed new enums to use "style" instead of the overloaded term "type".
2003-09-21  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch]: renamed new enums to use "style" instead
	of the overloaded term "type". Also renamed GimpGridType while I was
	on it.

	* app/core/gimpdrawable-stroke.[ch]
	* app/core/gimpgrid.[ch]
	* app/core/gimpscanconvert.[ch]
	* app/display/gimpdisplayshell.c
	* app/vectors/gimpvectors.c
	* app/gui/grid-dialog.c: changed accordingly.
2003-09-21 10:45:19 +00:00
Simon Budig 09630e45f9 Dave Neary <bolsh@gimp.org>
2003-09-21  Simon Budig  <simon@gimp.org>
            Dave Neary  <bolsh@gimp.org>

	* app/core/gimpdrawable-stroke.c: gimp_image_apply_image () must
	not get the pixel Region twice, use NULL for src1_tiles, which
	then defaults to the drawables tiles. Also pixel_region_init()
	does not take the offsets set by tile_manager_set_offsets into
	account. Use 0,0 instead of x1,y1. Fixes bad crashes.

	* app/core/gimpscanconvert.c: fixed crash for the same reason.

	* app/vectors/gimpvectors.c: Enabled the new stroking by default.
	Of course there should be a dialog to tweak the settings...  :-)
2003-09-21 00:58:04 +00:00
Simon Budig ca07f5ddb2 Dave Neary <bolsh@gimp.org>
2003-09-20  Simon Budig  <simon@gimp.org>
            Dave Neary  <bolsh@gimp.org>

	First steps towards Libart stroking. Right now the code
	crashes and thus is disabled by default. If you want to
	test it, change the #define LIBART_STROKE  in
	app/vectors/gimpvectors.c. Then a click on the stroke button
	in the paths dialog invokes the new code.
	The crash is in gimpdrawable-stroke.c - apparently I did not
	yet get the TileManager stuff correctly.

	* app/core/gimpscanconvert.[ch]: Rewritten to be more clear
	and have an easier API. Now can handle open Paths and
	libart-stroke the (open/closed) polygons defined earlier.

	* app/core/core-enums.h: Added Enums for LineJoin-Type and
	EndCap-Type for stroking.

	* app/core/core-enums.c: regenerated.

	* app/core/gimpimage-mask-select.c: Use the new API of
	GimpScanConvert where appropriate.

	* app/vectors/gimpvectors.c: Added #define to enable the libart
	stroking. Disabled by default because of the crash mentioned
	above...

	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.[ch]: Removed Libart stuff here.
	Libart usage now lives exclusively in GimpScanConvert.

	* app/core/gimpdrawable-stroke.[ch]: New files for the libart
	stroking (right now just vector objects).
	* app/core/Makefile.am: changed accordingly.

	* app/Makefile.am: Needed to tweak linking.  :-/
2003-09-20 19:58:26 +00:00
Simon Budig 66cc2b98b5 app/vectors/gimpstroke.[ch] Changed gimp_*_anchor_select to accept the
2003-09-17  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpvectors.[ch]: Changed gimp_*_anchor_select to
	accept the selection state as an argument.

	* app/tools/gimpdrawtool.[ch]: Added "exclusive" boolean parameter
	to gimp_draw_tool_on_vectors_handle(), so that you can specify
	that you just get exactly the type of anchor you want to have.

	* app/tools/gimpvectortool.[ch]: Handling of multiple selected
	anchors: Shift-Clicking in Extend mode selects them, you can
	move them together.
2003-09-17 21:49:45 +00:00
Simon Budig ba69b4bd96 Fixed stupid bug (for getting the bounding box you also have to use
2003-09-16  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors.[ch]: Fixed stupid bug (for getting
	the bounding box you also have to use MAX...).
2003-09-16 12:41:10 +00:00
Simon Budig e899c701ba Implemented an (unused/untested) gimp_vectors_bounds () that returns the
2003-09-16  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors.[ch]: Implemented an (unused/untested)
	gimp_vectors_bounds () that returns the bounding box of an vectors
	object.

	* app/tools/gimpdrawtool.[ch]: made gimp_draw_tool_on_vectors()
	ignore handles/anchors, since they are not visible when that
	function gets used.
2003-09-15 22:41:25 +00:00
Sven Neumann b4cc25eb18 removed...
2003-09-15  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform-utils.[ch]: removed...

	* app/core/gimp-transform-utils.[ch]: ...and added under new names
	because these functions are not at all related to GimpDrawable.
	Changed the function names accordingly.

	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/transform_tools.pdb: changed accordingly.

	* app/pdb/transform_tools_cmds.c: regenerated.
2003-09-15 17:41:18 +00:00
Sven Neumann 8bd0ec7685 added new function gimp_drawable_transform_matrix_flip().
2003-09-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform-utils.[ch]: added new function
	gimp_drawable_transform_matrix_flip().

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpvectors.c: don't push the complex GimpItem
	transformation API down to GimpStroke. Instead setup the matrices
	in GimpVectors and use a simpler API for GimpStroke.

	* app/vectors/gimpvectors-import.c: changed accordingly.

	* app/vectors/gimpvectors-export.c: close the <path> element.
2003-09-11 01:23:58 +00:00
Dave Neary 1c0b586e33 app/vectors/gimpvectors.[ch] app/vectors/gimpstroke.[ch] Cleanup - removed
2003-09-07  Dave Neary  <bolsh@gimp.org>

        * app/vectors/gimpvectors.[ch]
        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpbezierstroke.c: Cleanup - removed libart
        from the included headers in the .h files, don't pass around
        libart objects any more. Still stub code.
2003-09-07 18:09:58 +00:00
Sven Neumann f6f49b2328 redid the fix for the compiler warning: made gimp_vectors_to_art_vpath()
2003-09-07  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpvectors.[ch]: redid the fix for the compiler
	warning: made gimp_vectors_to_art_vpath() take a const GimpVectors
	again, but don't freeze/thaw it since it isn't changed anyway.
2003-09-07 00:03:36 +00:00
Sven Neumann 99dba1ca01 app/vectors/gimpbezierstroke.c app/vectors/gimpstroke.[ch] removed
2003-09-06  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpvectors.[ch]: removed compiler warnings, cleaned
	up coding style issues,
2003-09-06 20:00:38 +00:00
Dave Neary 1d4720e560 Ooops! Sorry for the oversight. app/vectors/gimpvectors.[ch]
2003-09-06  Dave Neary  <bolsh@gimp.org>

        Ooops! Sorry for the oversight.
        * app/vectors/gimpvectors.[ch]
        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpbezierstroke.c: Changed include order
        to conform to the coding standards in devel-docs/includes.txt
        (which should really be integrated into HACKING).
2003-09-06 18:40:48 +00:00
Dave Neary 0508bdcc4b Include libart headers app/vectors/gimpvectors.[ch]
2003-09-06  Dave Neary  <bolsh@gimp.org>

	* app/vectors/Makefile.am: Include libart headers
	* app/vectors/gimpvectors.[ch]
	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpbezierstroke.[ch]: Committing unfinished,
	useless stub code for converting a GimpVectors object to a
	libart vector path. Will pad this out later.
2003-09-06 16:39:08 +00:00
Sven Neumann bbfc737efa oops
oops
2003-09-02 14:07:43 +00:00
Sven Neumann b20358c07f removed a superfluous call to g_object_ref().
2003-09-02  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpeditselectiontool.c (init_edit_selection): removed
	a superfluous call to g_object_ref().

	* app/vectors/gimpvectors.c (gimp_vectors_copy_strokes): free the
	old list of strokes.
2003-09-02 14:00:38 +00:00
Sven Neumann e924a1372b app/text/gimptextlayout-render.c (gimp_text_layout_render)
2003-09-02  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout-render.c (gimp_text_layout_render)
	* app/widgets/gimpfontselection.c (gimp_font_selection_set_fontname)
	* app/widgets/gimptexteditor.c (gimp_text_editor_new)
	* app/gui/file-save-dialog.c (file_save_ok_callback): plugged
	some memleaks found using memprof.

	* app/vectors/gimpvectors.c: implemented the finalize method.

	* app/vectors/gimpstroke.c: minor code cleanup.

	* app/core/gimpdrawable.c (gimp_drawable_finalize)
	* app/core/gimplayer.c (gimp_layer_finalize)
	* app/core/gimpparasitelist.c (gimp_parasite_list_finalize):
	removed useless assertions.
2003-09-02 13:43:26 +00:00
Michael Natterer dcb6f225d9 added new virtual function GimpItem::stroke().
2003-09-01  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added new virtual function
	GimpItem::stroke().

	* app/core/gimpchannel.c
	* app/vectors/gimpvectors.c: implement GimpItem::stroke().

	* app/core/gimpimage-mask.[ch] (gimp_image_mask_stroke): changed
	signature to match gimp_item_stroke() (the selection mask *really*
	should be a GimpChannel subclass).
	Removed global variable "gboolean gimp_image_mask_stroking"...

	* app/core/gimpimage.[ch]: ...and added "gboolean mask_stroking"
	to the GimpImage struct.

	* app/gui/vectors-commands.[ch]: removed vectors_stroke_vectors().

	* app/widgets/widgets-types.h: removed GimpStrokeItemFunc typedef.

	* app/widgets/gimpvectorstreeview.[ch]: removed "stroke_item_func"
	member and use gimp_item_stroke() instead.

	* app/gui/dialogs-constructors.c (dialogs_vectors_list_view_new)
	* app/gui/edit-commands.c (edit_stroke_cmd_callback)
	* app/gui/vectors-commands. (vectors_stroke_cmd_callback)
	* app/widgets/gimpselectioneditor.c
	(gimp_selection_editor_stroke_clicked)
	* tools/pdbgen/pdb/edit.pdb (gimp_edit_stroke): changed accordingly.

	* app/pdb/edit_cmds.c: regenerated.

	Note that there is no GUI for "stroke channel", although it would
	be utterly cool to have one, since currently slelection stroking
	cannot be masked by a selection (because we stroke the selection).
	Anyway, if anyone has an idea how to trigger "stroke channel" with
	another drawable active (the one to stroke to), please let me
	know...
2003-09-01 17:56:44 +00:00