Commit Graph

251 Commits

Author SHA1 Message Date
Sven Neumann f8ea814c69 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
Sven Neumann 2e33617669 replaced GTK_CFLAGS by GDK_PIXBUF_CFLAGS.
2003-09-11  Sven Neumann  <sven@gimp.org>

	* app/vectors/Makefile.am (INCLUDES): replaced GTK_CFLAGS by
	GDK_PIXBUF_CFLAGS.

	* app/vectors/gimpvectors-export.c: added a first draft of
	GimpVectors SVG export.

	* app/gui/vectors-commands.c (vectors_export_cmd_callback): call
	gimp_vectors_export() with a hardcoded filename.
2003-09-10 23:00:45 +00:00
Sven Neumann 0037f5a7ea app/vectors/gimpvectors-import.[ch] allow to optionally create a
2003-09-11  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpvectors-import.[ch]
	* app/gui/vectors-commands.c: allow to optionally create a
	GimpVectors object per <path> element. Made this the default until
	there's a GUI for this.
2003-09-10 22:11:02 +00:00
Sven Neumann 693b9011c1 finished basic SVG path import.
2003-09-10  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpvectors-import.c: finished basic SVG path import.
2003-09-10 20:27:20 +00:00
Sven Neumann 0700992ea4 call gimp_vectors_import(). Hardcoded filename to path.svg for now.
2003-09-10  Sven Neumann  <sven@gimp.org>

	* app/gui/vectors-commands.c (vectors_import_cmd_callback): call
	gimp_vectors_import(). Hardcoded filename to path.svg for now.

	* app/vectors/gimpvectors-import.c: more work on the SVG parser.
2003-09-10 16:52:45 +00:00
Sven Neumann 9506c7570e started to add framework for SVG parser.
2003-09-10  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpvectors-import.c: started to add framework for
	SVG parser.
2003-09-10 14:55:54 +00:00
Sven Neumann eb790849de app/vectors/Makefile.am app/vectors/gimpvectors-export.[ch] added stubs
2003-09-10  Sven Neumann  <sven@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/gimpvectors-export.[ch]
	* app/vectors/gimpvectors-import.[ch]: added stubs for
	import/export of paths.

	* app/vectors/gimpvectors-preview.h: cosmetics.
2003-09-10 13:05:00 +00:00
Sven Neumann 4a4fa137d0 allow to optionally export all paths from an image into a single SVG file.
2003-09-11  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpvectors-export.[ch]: allow to optionally export
	all paths from an image into a single SVG file.

	* app/gui/vectors-commands.c: changed accordingly.
2003-09-10 13:05:00 +00:00
Sven Neumann 62cd231745 app/vectors/Makefile.am app/vectors/gimpvectors-export.[ch] added stubs
2003-09-10  Sven Neumann  <sven@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/gimpvectors-export.[ch]
	* app/vectors/gimpvectors-import.[ch]: added stubs for
	import/export of paths.

	* app/vectors/gimpvectors-preview.h: cosmetics.
2003-09-10 13:05:00 +00:00
Simon Budig a0cc73de42 Made gimp_vectors_compat_get_points accept more paths gracefully. It now
2003-09-09  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors-compat.[ch]: Made
	gimp_vectors_compat_get_points accept more paths gracefully. It
	now is sufficient if there is up to one open stroke in the
	vectors object - it does not have to be the last one.

	Added function to determine if all vectors can be saved in
	compatibility mode.

	* app/vectors/gimpanchor.[ch]: Made GimpAnchor a boxed type.
	* app/vectors/gimpstroke.[ch]: Add two properties to gimpstroke:
	"closed" and "control-points" (the latter is
	G_PARAM_CONSTRUCT_ONLY). Added functions to get the points that
	determine the shape of the stroke - necessary for proper saving.

	* app/xcf/xcf-private.h: added new PROP_VECTORS and XcfStrokeType.

	* app/xcf/xcf-load.c: Be able to load PROP_VECTORS, make loading
	of PROP_PATHS ignore empty paths.

	* app/xcf/xcf-save.c: Added code for saving PROP_VECTORS,
	disabled by default. Define NEW_SAVE_CODE if you want to test
	it. No guarantees are made about the forward compatibility of
	the format used.
2003-09-09 15:46:59 +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
Simon Budig 078d575b31 Implemented gimp_bezier_stroke_arcto () that creates an elliptical arc in
2003-09-11  Simon Budig  <simon@gimp.org>

	* vectors/gimpbezierstroke.[ch]: Implemented
	gimp_bezier_stroke_arcto () that creates an elliptical arc
	in the way SVG works.

	* vectors/gimpvectors-import.c: use it.
2003-09-07 18:09:58 +00:00
Dave Neary e88298a35c 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
Michael Natterer 47ba171afd app/display/display-types.h app/tools/tools-types.h
2003-09-07  Michael Natterer  <mitch@gimp.org>

	* app/display/display-types.h
	* app/tools/tools-types.h
	* app/vectors/vectors-types.h
	* app/widgets/widgets-types.h: removed some forgotten cruft.

	* app/vectors/gimpbezierstroke.h
	* app/vectors/gimpstroke.h
	* app/vectors/gimpvectors.h: added class struct typedefs here.
2003-09-07 10:29:10 +00:00
Simon Budig 966d58c5c0 Implemented gimp_bezier_stroke_arcto () that creates an elliptical arc in
2003-09-11  Simon Budig  <simon@gimp.org>

	* vectors/gimpbezierstroke.[ch]: Implemented
	gimp_bezier_stroke_arcto () that creates an elliptical arc
	in the way SVG works.

	* vectors/gimpvectors-import.c: use it.
2003-09-07 10:29:09 +00:00
Michael Natterer 1345a6d062 app/display/display-types.h app/tools/tools-types.h
2003-09-07  Michael Natterer  <mitch@gimp.org>

	* app/display/display-types.h
	* app/tools/tools-types.h
	* app/vectors/vectors-types.h
	* app/widgets/widgets-types.h: removed some forgotten cruft.

	* app/vectors/gimpbezierstroke.h
	* app/vectors/gimpstroke.h
	* app/vectors/gimpvectors.h: added class struct typedefs here.
2003-09-07 10:29:09 +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
Simon Budig 430b96b682 Bah. Fixed stupid error from my last commit.
2003-09-04  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: Bah. Fixed stupid error from
	my last commit.
2003-09-04 13:08:03 +00:00
Simon Budig ea865689d0 Changed the direct dragging of a segment a bit, so that close to one
2003-09-04  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: Changed the direct dragging
	of a segment a bit, so that close to one endpoint only one
	handle gets moved.
2003-09-04 11:54:55 +00:00
Simon Budig 70088acbcd app/vectors/gimpstroke.c Two small hacks to make the editing behave more
2003-09-03  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.c
	* app/vectors/gimpbezierstroke.c: Two small hacks to make the
	editing behave more symmetric (no more a user visible difference
	between extending to the start or to the end of a stroke).

	* app/tools/gimpvectortool.c: Use dashed lines for the connection
	between the anchor and the handles. Looks great IMHO.
2003-09-03 21:35:24 +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
Simon Budig f1b283bdde duplicate the closed property too. fixes Bug #120961.
2003-09-02  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.c: duplicate the closed property too.
	fixes Bug #120961.
2003-09-02 10:18:49 +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
Simon Budig f09f3657d4 Introduced function to compare two gimpcoords
2003-09-01  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpcoordmath.[ch]: Introduced function to compare
	two gimpcoords

	* app/vectors/gimpstroke.[ch]: virtualized gimp_stroke_close.

	* app/vectors/gimpbezierstroke.c: made the _close function check,
	if there is an unneeded segment (CCA-Sequence with all the same
	coordinates) at the gap to be closed. If so, remove it.
2003-09-01 00:39:47 +00:00
Simon Budig 3ef7043437 fixed it to create proper strokes...
2003-09-01  Simon Budig  <simon@gimp.org>

	* vectors/gimpbezierstroke.c: fixed it to create proper strokes...
2003-08-31 23:22:16 +00:00
Sven Neumann cf35e23578 use the new bezier stroke API.
2003-09-01  Sven Neumann  <sven@gimp.org>

	* app/text/gimptext-vectors.c: use the new bezier stroke API.

	* app/vectors/gimpbezierstroke.c (gimp_bezier_stroke_new_moveto):
	pass a NULL anchor to the first call of gimp_bezier_stroke_extend().
2003-08-31 22:33:50 +00:00
Simon Budig 835d7ab7f7 Implemented moveto/lineto/ conicto/curveto-Interface. Moved helper
2003-08-31  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.[ch]: Implemented moveto/lineto/
	conicto/curveto-Interface.
	Moved helper functions to calculate with GimpCoords into...

	* app/vectors/gimpcoordmath.[ch]: ...these new files.

	* app/vectors/Makefile.am: Changed accordingly.
2003-08-31 21:47:26 +00:00
Simon Budig e7d0cfadc7 Do not modify the selection state of the anchors. When extending
2003-08-29  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: Do not modify the selection
	state of the anchors. When extending EXTEND_EDITABLE return
	the anchor created (not the handle at the end of the list)

	* app/tools/tools-enums.h: Added new mode-enum for the vector tool.
	* app/tools/tools-enums.c: regenerated

	* app/tools/gimpvectortool.[ch]: Implemented moving (Shortcuts
	ALT and ALT+CTRL. The whole assignment of modifiers right now
	gets revised. Right now you have to use the Tool options to
	switch between the modes of operation. Connecting strokes now
	works in Insert/Delete mode by clicking on startpoint and
	dragging to target endpoint.

	I will write a mail to gimp-devel when the shortcuts are
	setteled a bit more. Sorry for the inconvenience.
2003-08-29 15:17:06 +00:00
Simon Budig f4b390a4f4 app/core/gimpimage-mask-select.c Fixed two crashes when a path with a
2003-08-28  Simon Budig  <simon@gimp.org>

	* app/core/gimpimage-mask-select.c
	* app/vectors/gimpbezierstroke.c: Fixed two crashes when a path
	with a single node in a stroke got converted to a selection or got
	stroked.
2003-08-28 16:53:09 +00:00
Michael Natterer c4dfccd8db Enabled type-preserving DND of all kinds of items between different
2003-08-27  Michael Natterer  <mitch@gimp.org>

	Enabled type-preserving DND of all kinds of items between
	different images. Fixes bug #119983.

	* app/core/gimpitem.[ch]: added new virtual function
	GimpItem::convert() which duplicates an item for another image.

	* app/core/gimplayer.[ch]: removed gimp_layer_new_from_drawable()
	and made it a GimpItem::convert() implementation.

	* app/vectors/gimpvectors.[ch]: removed gimp_vectors_convert() and
	made it a GimpItem::convert() implementation.

	* app/widgets/gimpitemtreeview.[ch]: removed GimpConvertItemFunc
	typedef and function pointer in GimpItemTreeViewClass since
	we can simply call gimp_item_convert() now.

	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpvectorstreeview.c
	* app/display/gimpdisplayshell-dnd.c
	* tools/pdbgen/pdb/layer.pdb: changed accordingly.

	* app/pdb/layer_cmds.c: regenerated.
2003-08-27 17:21:49 +00:00
Simon Budig 08bd7a19b9 app/vectors/gimpstroke.[ch] Implemented function to connect two strokes.
2003-08-27  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpbezierstroke.c: Implemented function to
	connect two strokes.

	* app/tools/gimpvectortool.[ch]: Use it. Right now you have
	to click on one endpoint, and then SHIFT+CTRL+ALT-Click on
	the other endpoint.

	Suggestions on how to solve that more sanely are welcome...
2003-08-27 00:31:20 +00:00
Simon Budig 47571782a7 Intruduce casting macro GIMP_ANCHOR.
2003-08-26  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpanchor.h: Intruduce casting macro GIMP_ANCHOR.

	* app/tools/gimpvectortool.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpvectors-compat.c: Use it for code readibility.
2003-08-26 14:29:10 +00:00
Simon Budig 4571b6b5bd Minor code cleanup that automagically makes SHIFT while curve-dragging
2003-08-26  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: Minor code cleanup that
	automagically makes SHIFT while curve-dragging work...
2003-08-26 08:59:30 +00:00
Simon Budig 009766a881 app/vectors/gimpstroke.[ch] Implemented direct moving of the curve. Whee!
2003-08-26  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpbezierstroke.c: Implemented direct moving of the
	curve. Whee!  :-)

	* app/tools/gimpvectortool.[ch]: Use it.
2003-08-26 00:27:03 +00:00
Michael Natterer 24f3da165b changed GimpObject::get_memsize() to return a second value named
2003-08-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to
	return a second value named "gui_size", where the primary return
	value is the "constant" actual size (as long as no operation is
	performed on the object), and the second "gui_size" return value
	is the size of temporary stuff like preview caches or boundary
	segments (which may change asynchronously, even if the object is
	on the undo stack).

	* 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.c
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimpundo.c
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c: changed get_memsize() implementations
	accordingly.

	* app/display/gimpdisplayshell-title.c
	* app/gui/debug-commands.c
	* app/widgets/gimppreview.c: changed callers accordingly.

	* app/core/gimpimage-undo-push.c: changed layer, channel, vectors
	and layer_mask undo steps to add/subtract the size of the
	resp. objects whenever they take/drop ownership of them. Ignore
	the objects' "gui_size" to get identical sizes on
	adding/subtracting. Fixes bug #120429.
2003-08-25 10:49:33 +00:00
Simon Budig 14d0ec8b2c app/tools/gimpvectortool.c OK, now valgrind is happy.
2003-08-22  Simon Budig  <simon@gimp.org>

	* app/tools/gimpvectortool.c
	* app/vectors/gimpbezierstroke.c: OK, now valgrind is happy.
2003-08-22 15:20:13 +00:00
Simon Budig d368e27e5a app/vectors/gimpstroke.c app/vectors/gimpvectors-preview.c
2003-08-22  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors-preview.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: Added missing checking for NULL
	return values. Hopefully this fixes the crashes others are
	observing.
2003-08-22 13:00:25 +00:00
Simon Budig 9d31a9db10 fixed crash when deleting the last segment of a closed curve.
2003-08-22  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: fixed crash when deleting
	the last segment of a closed curve.
2003-08-22 09:55:56 +00:00
Simon Budig 32499a849d app/vectors/gimpstroke.[ch] added gimp_(bezier_)stroke_open that opens up
2003-08-22  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpbezierstroke.c: added
	gimp_(bezier_)stroke_open that opens up a stroke (possibly
	returns a new one if it falls apart).

	* app/tools/gimpvectortool.[ch]: make it possible to break
	up a stroke by deleting (CTRL-Clicking in Insert/Delete mode)
	the curve between two anchors.
2003-08-22 01:12:26 +00:00
Simon Budig 044ea72c69 added _is_empty () that checks if a stroke is empty.
2003-08-21  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.[ch]: added _is_empty () that checks
	if a stroke is empty.

	* app/vectors/gimpbezierstroke.c: Implemented _anchor_delete ()

	* app/vectors/gimpvectors.[ch]: added _stroke_remove ()

	* app/tools/gimpvectortool.[ch]: implemented the deletion of
	anchors. CTRL-Click on the anchor in Insert/Delete mode does
	the trick. Also did some renaming to the Vector tool
	(now Path tool) and set the Tooltip to something sane.

	Folks, I think the new path tool is no longer a regression
	against the 1.2 bezier select tool!
2003-08-21 17:47:12 +00:00
Simon Budig 52a16ff5a4 Add hooks for insertion of points (and testing if insertion is possible)
2003-08-20  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpstroke.[ch]: Add hooks for insertion of points
        (and testing if insertion is possible)

        * app/vectors/gimpbezierstroke.c: Implement it for BezierStrokes

        * app/tools/gimpvectoroptions.c: Adjusted Options-GUI.

        * app/tools/gimpvectortool.[ch]: Detect if the pointer is over
        the curve. Make it possible to insert points in the curve.
        Select the "Insert/Delete Nodes" mode in the tool options and
        click on the curve.
2003-08-20 17:29:13 +00:00
Simon Budig 5ccd61bcb5 app/vectors/gimpvectors.h removed temp_anchor stuff. I don't think that
2003-08-19  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpvectors.h
        * app/vectors/gimpstroke.[ch]: removed temp_anchor stuff. I don't
        think that this is needed. Added virtual function to determine the
        closest point on the curve to a given target point.

        * app/vectors/gimpbezierstroke.c: implemented
        gimp_bezier_stroke_nearest_point_get () - up to now untested and
        unused.
2003-08-19 01:05:48 +00:00
Simon Budig 86e4d32a44 app/vectors/gimpstroke.[ch] Virtualized gimp_bezier_stroke_extend, added
2003-08-17  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpbezierstroke.[ch]: Virtualized
	gimp_bezier_stroke_extend, added gimp_stroke_is_extendable.

	* app/text/gimptext-vectors.c: changed accordingly.

	* app/vectors/gimpvectors.[ch]: added gimp_vectors_anchor_select.

	* app/tools/gimpvectoroptions.[ch]: dummy switch for future
	extensions

	* app/tools/gimpvectortool.[ch]: Major overhaul. Made use of
	gimp_vector_tool_oper_update, cleaned up
	gimp_vector_tool_button_press a lot and finally have a
	working cursor_update. Still buggy, but I wanted to have it
	in CVS.
2003-08-17 02:49:24 +00:00
Simon Budig 8d048a513c app/vectors/gimpstroke.[ch] Moved transformations code to gimpstroke, so
2003-08-07  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpvectors.c: Moved transformations code to
        gimpstroke, so that the gimpvector no longer fiddles in
        the stroke internals.
2003-08-07 17:05:14 +00:00
Simon Budig 10cb43d2fb implemented gimp_stroke_close.
2003-08-02  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpstroke.[ch]: implemented gimp_stroke_close.

        * app/vectors/gimpbezierstroke.c: only extend a stroke if
        it is not closed.

        * app/tools/gimpvectortool.c: ALT-Click on an anchor now
        closes the stroke. Will evolve to the ability to connect
        two strokes.
2003-08-03 01:26:05 +00:00
Hans Breuer b70d6c3317 renamed GimpOrientationType with Compat postfix to avoid name clashing
2003-07-26  Hans Breuer  <hans@breuer.org>

	* libgimp/gimpcompat.h : renamed GimpOrientationType
	with Compat postfix to avoid name clashing when using
	this header together with libgimp/gimpenums.h

	* app/composite/makefile.msc : (new file)
	  **/makefile.msc : updated

	* libgimp/gimp.c : use static defined _tile<widht|height>
	in this file instead of function call

	* libgimp/gimp.def libgimp/libgimpui.def : moved from former
	to latter : gimp_<brush|font|gradient|pattern>_select_<new|destroy>
	added to former gimp_<brushes|gradients|patterns>_popup

	* app/paint/gimppaintcore.h : removed double semicolon
	which gave msvc error C2059: syntax error : ';'

	* libgimpbase/gimpwin32-io.h : (new file) compatibilty defines
	which were spread over multiple files to make up mostly for
	missing unistd.h

	* app/base/tile-swap.c app/core/gimpimagefile.c
	  libgimpbase/gimpdatafiles.c
	  plug-ins/FractalExplorer/FractalExplorer.c : use new header

	* plug-ins/gflare/gflare.c
	  plug-ins/flame/flame.c
	  plug-ins/FractalExplorer/Dialogs.c :
	removed #ifdef G_OS_WIN32 special casing, not needed anymore
	due to g_file_test() usage

	* app/text/*.* : changes required for build with PangoWin32,
	but not commited ...
2003-07-26 17:37:32 +00:00
Sven Neumann 7c4d375aa9 app/vectors/Makefile.am added a simple GimpAnchor API.
2003-07-17  Sven Neumann  <sven@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/gimpanchor.[ch]: added a simple GimpAnchor API.

	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpstroke.c: use the new functions.
2003-07-17 18:06:32 +00:00
Michael Natterer db2b23f1aa invert the matrix for direction == GIMP_TRANSFORM_BACKWARD. Fixes
2003-07-16  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpvectors.c (gimp_vectors_transform): invert the
	matrix for direction == GIMP_TRANSFORM_BACKWARD. Fixes corrective
	transformation of paths.
2003-07-16 16:21:28 +00:00
Sven Neumann 5c4020edf2 libgimpmath/gimpmathtypes.h moved struct declarations.
2003-07-07  Sven Neumann  <sven@gimp.org>

	* libgimpmath/gimpmathtypes.h
	* libgimpmath/gimpvector.h: moved struct declarations.

	* libgimpmath/gimpmatrix.[ch]: made GimpMatrix3 and GimpMatrix4
	structs instead of typedefs for arrays. Pass them by reference,
	not by value. Added lots of const qualifiers.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform-utils.[ch]
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.c
	* app/pdb/transform_tools_cmds.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/transform_tools.pdb: changed accordingly.
2003-07-07 13:50:48 +00:00
Sven Neumann e78601452c app/gui/edit-commands.c added "Fill with Pattern" menu entry as suggested
2003-07-02  Sven Neumann  <sven@gimp.org>

	* app/gui/edit-commands.c
	* app/gui/image-menu.c: added "Fill with Pattern" menu entry as
	suggested in bug #116365.

	* app/base/temp-buf.c
	* app/base/tile-swap.c
	* app/config/gimpbaseconfig.c
	* app/config/gimpconfig-types.c
	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell.c
	* app/file/file-utils.c
	* app/paint-funcs/paint-funcs-types.h
	* app/tools/gimpdrawtool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.h
	* app/tools/gimptextoptions.c
	* app/paint-funcs/paint-funcs-types.h
	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c
	* app/vectors/vectors-types.h
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpmisc.h
	* libgimpmodule/gimpmodule.c: fixed some minor issues found
	compiling with -pedantic.

	* app/pdb/misc_tools_cmds.c
	* tools/pdbgen/pdb/misc_tools.pdb: adapt to the changed order of
	arguments for gimp_image_pick_color().
2003-07-02 18:01:19 +00:00
Simon Budig 1a80262e7e rewrote gimp_bezier_stroke_extend for the case when the neighbor is not
2003-06-26  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpbezierstroke.c: rewrote gimp_bezier_stroke_extend
        for the case when the neighbor is not really an end point of the
        stroke, but close enough to the end to still be acceptable.

        * app/tools/gimpvectortool.c: Make the tool behave sanely
        and more symetrically (both ends of a stroke behave basically the
        same now), gimp_draw_on_handle () now prefers the anchor passed
        into it via the *ret_anchor parameter over other preferred anchors.
2003-06-26 09:54:56 +00:00
Sven Neumann 4e4b91eda1 attempt to convert text from locale encoding.
2003-06-25  Sven Neumann  <sven@gimp.org>

	* app/text/gimptext-parasite.c (gimp_text_from_gdyntext_parasite):
	attempt to convert text from locale encoding.

	* app/vectors/gimpvectors-compat.c (gimp_vectors_compat_new):
	allow paths with zero points (bug # 115955).

	* plug-ins/script-fu/script-fu-server.c: if a connection to a
	client is lost, invalidate file descriptors in the command queue.
	Plugged a couple of memleaks.
2003-06-25 21:18:45 +00:00
Simon Budig ca50643729 If an control handle gets converted to an edge simply move it to its next
2003-06-25  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpbezierstroke.c: If an control handle gets
        converted to an edge simply move it to its next anchor.

        * app/tools/gimpvectortool.c: Improved interactive handling
        of vectors. Still work in progress, esp. I am not sure about
        the assignment of the modifier keys. Right now it is:

           Drag (Anchor/Handle): Regular Movement
           Shift-Click (Anchor): select multiple anchors (does not work yet)
           Shift-Drag: (Handle): move opposite handle symmetrically
           Ctrl-Drag (Anchor): Drag out control point
           S-C-Click: (Anchor/Handle): Convert to Edge
2003-06-24 23:11:13 +00:00
Hans Breuer 89bfbdf66d updated win32 (msvc) build
2003-05-24  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc **/*.def : updated win32 (msvc) build

	* plug-ins/twain/twain.c plug-ins/winsnap/winsnap.c :
	add the extra parameter to gimp_main() calls
2003-05-24 17:00:03 +00:00
Michael Natterer f7351b0bbb app/vectors/Makefile.am new files implementing a compatibility API for
2003-05-22  Michael Natterer  <mitch@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/gimpvectors-compat.[ch]: new files implementing a
	compatibility API for converting old XCF and PDB point arrays
	to GimpVectors and vice versa.

	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/paths.pdb: use the new functions instead of
	having slightly different, but equally ugly code twice.

	* app/xcf/xcf-load.c: cleaned up path loading a lot. Removed the
	path_point loading utility functions.

	* app/pdb/paths_cmds.c: regenerated.

	* app/Makefile.am: link vectors/libappvectors.a after
	xcf/libappxcf.a so the compat functions (which are not needed in
	vectors/) are found.  Also reverted an accidentially checked in
	change to the libgimpwidgets link order.
2003-05-22 19:02:38 +00:00
Michael Natterer 487f71ba05 Removed the old paths and the remaining legacy stuff it needed. Fixes bug
2003-05-21  Michael Natterer  <mitch@gimp.org>

	Removed the old paths and the remaining legacy stuff it needed.
	Fixes bug #104471.

	* Makefile.am
	* configure.in
	* pixmaps/*: removed the pixmaps/ directory.

	* app/ops_buttons.[ch]
	* app/path.[ch]
	* app/pathP.h
	* app/path_transform.h
	* app/gui/paths-dialog.[ch]
	* app/tools/gimpbezierselecttool.[ch]: removed these files.

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

	* app/core/core-types.h: removed the Path* types.

	* app/core/gimpimage.[ch]
	* app/core/gimpimage-duplicate.c: removed gimage->paths.

	* app/gui/about-dialog.c: inline wilber2_xpm for now.

	* app/gui/dialogs-constructors.c
	* app/gui/dialogs-menu.c
	* app/gui/dialogs.c
	* app/gui/menus.c: removed the old paths dialog.

	* app/gui/gui.c: removed gui_rotate_the_shield_harmonics() hack
	which was broken anyway.

	* app/tools/gimptransformtool.c: #if 0 path_transform preview stuff.

	* app/tools/gimpiscissorstool.c: removed useless include.

	* app/tools/tools.c: removed the bezier select tool.

	* app/vectors/gimpvectors.c (gimp_vectors_real_stroke_add): use
	g_list_append(), not g_list_prepend() so some ugly side conditions
	of legacy path loading are honored.

	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c: load and save only GimpVectors.
2003-05-21 17:38:14 +00:00
Michael Natterer 966fb5595f don't default to clip_result == TRUE (unlike the other transform
2003-05-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_rotate): don't default to
	clip_result == TRUE (unlike the other transform functions).

	* app/core/gimpdrawable-transform.c
	(gimp_drawable_transform_tiles_rotate): fixed offset calculation.

	* app/core/gimpimage-rotate.c: change the image size *after* all items
	are rotated. Adjust all items' offsets after rotation. Rotate the
	resolutions too. Seems to work now and fixes bug #6101.

	* app/core/gimpimage.c (gimp_image_size_changed): emit
	"size_changed" on all vectors.

	* app/core/gimpitem-linked.[ch]: added gimp_item_linked_rotate().

	* app/gui/drawable-commands.c: flip and rotate linked items too.

	* app/vectors/gimpvectors.c (gimp_vectors_rotate): fixed rotation
	angles.

	Unrelated:

	* app/core/gimpimage-merge.c: don't #include "path.h".
2003-05-20 15:26:38 +00:00
Sven Neumann 4e335f7fc2 no need to include gimp-intl.h.
2003-05-20  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-flip.c: no need to include gimp-intl.h.

	* app/core/gimpimage-rotate.c: change the image size if needed;
	implemented rotation of guides.

	* app/vectors/gimpvectors.c: implemented rotation of vectors.
2003-05-20 11:55:12 +00:00
Sven Neumann 1de667f0b6 added new enum GimpRotationType.
2003-05-20  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch]: added new enum GimpRotationType.

	* app/core/Makefile.am
	* app/core/gimpimage-rotate.[ch]: new files.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.c
	* app/vectors/gimpvectors.c: added GimpItem::rotate. Still work in
	progress.

	* plug-ins/common/rotate.c: don't install any menu entries. The
	plug-in is only kept around to provide plug_in_rotate for backward
	compatibility.

	* app/gui/drawable-commands.[ch]
	* app/gui/image-commands.[ch]
	* app/gui/image-menu.c: use the new rotate implementation and use
	stock icons for the menu entries. Fixes bug #57797.
2003-05-20 10:36:29 +00:00
Simon Budig 0174bb6d6a Implemented closed paths. Not yet available in a sane manner via the UI.
2003-05-19  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.[ch]: Implemented closed paths. Not
	yet available in a sane manner via the UI. Added the last missing
	line from gimp_bezier_stroke_interpolate ().

	* app/tools/gimpvectortool.c: Changed accordingly

	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpvectors.[ch]: removed Tabs.
2003-05-18 23:08:01 +00:00
Michael Natterer 146a51c55f changed to expect all points (also the first one) in "H, A, H" order.
2003-05-18  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpbezierstroke.[ch]
	(gimp_bezier_stroke_new_from_coords): changed to expect all points
	(also the first one) in "H, A, H" order.  Ignore the first coord
	in the array for now. Added "gboolean closed" parameter.

	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/paths.pdb: shuffle the legacy path point arrays
	around before creating strokes so they match the new order.

	* app/pdb/paths_cmds.c: regenerated.
2003-05-18 16:36:10 +00:00
Michael Natterer bda46bbc35 added new function gimp_vectors_convert() which duplicates a GimpVectors
2003-05-18  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpvectors.[ch]: added new function
	gimp_vectors_convert() which duplicates a GimpVectors for another
	image.

	* app/widgets/gimpvectorstreeview.c
	(gimp_vectors_tree_view_class_init): use it as
	GimpItemTreeView::convert_item() implementation. Enables
	DND-copying of vectors between images.
2003-05-18 11:18:58 +00:00
Michael Natterer 0c67310555 app/vectors/gimpbezierstroke.[ch] app/vectors/gimpstroke.[ch]
2003-05-16  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpbezierstroke.[ch]
	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpvectors-preview.c
	* app/vectors/gimpvectors.[ch]: massive cleanup / code review:
	Made default implementations real ones. Don't add "const" to
	call-by-value parameters. Iterate lists using for() loops. Moved
	variables to local scopes. Removed tabs. Indentation. Stuff...

	* app/vectors/gimpstroke.[ch]: added unused "gboolean closed"
	member.
2003-05-16 16:49:04 +00:00
Michael Natterer c1eddd4fbc actually increment the coord index when iterating the coords array. Fixes
2003-05-15  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpbezierstroke.c
	(gimp_bezier_stroke_new_from_coords): actually increment the coord
	index when iterating the coords array. Fixes bug #113049.
2003-05-15 12:28:57 +00:00
Michael Natterer a4395cead9 added "gboolean clip_result" to GimpItem::flip().
2003-05-13  Michael Natterer  <mitch@gimp.org>

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

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

	* app/core/gimpdrawable.c: implement GimpItem::flip() and
	GimpItem::transform().

	* app/core/gimpchannel.c
	* app/core/gimplayer.c: chain up in flip() and transform() and do
	only the layer/channel specific stuff here.

	* app/core/gimpdrawable-transform.[ch]: fixed indentation.
	(gimp_drawable_transform_tiles_flip): added "gboolean clip_result"
	and warn that it is not yet implemented.
	(gimp_drawable_transform_tiles_affine): when transforming a
	channel set bg_color to transparent. Clip channels (but not layer
	masks) only if the passed tiles have bpp == 1 (the channel is
	unfloated).
	(gimp_drawable_transform_affine): clip all unfloated channels.

	* app/core/gimpitem-linked.[ch]: added gimp_item_linked_get_list()
	utility function to avoind iterating all layers/channels/vectors
	in all functions.

	* app/tools/gimptransformtool.c: clip all unfloated channels.

	The clipping fixes above together fix bug #112858.
2003-05-13 13:57:11 +00:00
Michael Natterer 45334e637e Added support for transforming linked layers, channels and vectors. Fixes
2003-05-12  Michael Natterer  <mitch@gimp.org>

	Added support for transforming linked layers, channels
	and vectors. Fixes bug #86277.

	* app/core/gimpdrawable-transform.[ch]
	(gimp_drawable_transform_tiles_flip): added "gdouble axis" and
	calculate the resulting drawable offset.
	(gimp_drawable_transform_flip): calculate the axis and pass it to
	the function above.
	(gimp_drawable_transform_[tiles_]affine): reordered parameters.

	* app/core/gimpitem.[ch]: added virtual functions GimpItem::flip()
	and GimpItem::transform().

	* app/core/gimpchannel.c
	* app/core/gimplayer.c
	* app/vectors/gimpvectors.c: implement flip() and transform().
	Note that all functions always transform the whole item,
	regardless of a present selection.

	* app/core/Makefile.am
	* app/core/gimpitem-linked.[ch]: new files containing utility
	functions which translate, flip and transform all linked items.

	* app/tools/gimpfliptool.c
	* app/tools/gimptransformtool.c
	* tools/pdbgen/pdb/layer.pdb: use the new gimp_item_linked_*()
	functions to translate, flip and transform all linked items.

	* tools/pdbgen/pdb/transform_tools.pdb: follow
	gimp_drawable_transform_affine() API change.

	* app/pdb/layer_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2003-05-12 15:56:36 +00:00
Michael Natterer 457368140d added "gboolean push_undo" to GimpItem::translate() and don't push and
2003-05-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added "gboolean push_undo" to
	GimpItem::translate() and don't push and undo in
	gimp_item_translate().

	* app/core/gimpchannel.[ch]: removed public function
	gimp_channel_translate() and implement GimpItem::translate().

	* app/core/gimpimage-mask.c
	* app/core/gimplayer.c: changed accordingly.

	* app/vectors/gimpvectors.c: actually translate the vectors
	in translate().

	* app/gui/channels-commands.c (channels_new_channel_query): removed
	useless call to gimp_channel_translate().

	* app/tools/gimpeditselectiontool.c
	* tools/pdbgen/pdb/layer.pdb: when translating a linked layer,
	also translate all linked channels and vectors. Cleanup.

	Note that the "linked" behaviour has changed: before this change,
	moving a layer moved all linked layers unconditionally. Now,
	linked layers/channels/vectors are moved *only* if the moved layer
	is also linked (the linked items behave as a group now and moving
	something not in the group does not affect the group).

	* app/pdb/layer_cmds.c: regenerated.
2003-05-09 13:05:37 +00:00
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
Simon Budig 6a29d4773e app/tools/gimpvectortool.[ch] app/vectors/gimpbezierstroke.c
2003-03-29  Simon Budig  <simon@gimp.org>

        * app/tools/gimpvectortool.[ch]
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpstroke.[ch]
        * app/vectors/vectors-types.h: More vector tool stuff. Control
        handles start to behave...
2003-03-29 04:47:44 +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
Simon Budig aac6a44ff0 app/tools/gimpvectortool.[ch] Fixed crashes and weird problems when the
2003-03-20  Simon Budig  <simon@gimp.org>

        * app/tools/gimpvectortool.[ch]
        Fixed crashes and weird problems when the tool changed images or
        images got closed. Fixes Bug #108318.

        * app/vectors/vectors-types.h: More sane names for the
        GimpAnchorType enum.

        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpstroke.c: changed accordingly.
2003-03-19 23:51:43 +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
Simon Budig 62b61811b3 New Type: GimpVectorExtendMode
2002-12-31  Simon Budig  <simon@gimp.org>

        * app/vectors/vectors-types.h: New Type: GimpVectorExtendMode

        * app/tools/gimpvectortool.c
        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpbezierstroke.[ch]: More stuff on the path
        (pun intended) to a better path tool...

        Thanks to Sven for being my host in Berlin!
2002-12-31 03:18:49 +00:00
Simon Budig b7e1bb247b app/vectors/gimpanchor.h Anchors now have an enum as type and have the
2002-12-30  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpanchor.h
        * app/vectors/vectors-types.h: Anchors now have an enum as type and
        have the "selected" property.

        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpvectors-preview.c: Additional functions to get
        information about the graphical representation of the stroke and be
        able to select anchors.

        * app/tools/gimpvectortool.c: semi-usable interface, better graphical
        representation of what is going on. Also make use of the "selected"
        property of the anhors to just display a subset of the control
        handles.
2002-12-30 16:36:01 +00:00
Simon Budig d3e9fc6405 app/core/gimpimage-mask-select.c app/paint/gimppaintcore-stroke.c
2002-12-29  Simon Budig  <simon@gimp.org>

        * app/core/gimpimage-mask-select.c
        * app/paint/gimppaintcore-stroke.c
        * app/tools/gimpvectortool.c
        * app/vectors/gimpbezierstroke.[ch]
        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpvectors-preview.c: some more stuff for the
        vectors tool: bezier interpolation is available, we have preview
        generation. Usage is still weird.
2002-12-28 23:52:29 +00:00
Simon Budig 6a55799603 untested and unused stuff for the interpolation of bezier curves. More to
222002-12-28  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpbezierstroke.c: untested and unused stuff
        for the interpolation of bezier curves. More to come soon.
2002-12-28 01:48:08 +00:00
Hans Breuer 7c7ff46cc6 updated
2002-11-30  Hans Breuer  <hans@breuer.org>

	* */makefile.msc */*/makefile.msc : updated

	* themes/Default/images/makefile.msc : new file
	* themes/Default/makefile.msc : removed

	* libgimpwidgets/gimpwidgets.def : updated

	* app/core/core-types.h : renamed PIXELS and POINTS
	to SIZE_* to avoid clashes with system headers
	* app/pdb/text_tool_cmds.c : updated ...
	* tools/pdbgen/enums.py : ... by renaming here too.

	* app/widgets/gimphistogrambox.c : <string.h> for memcpy()
	* app/widgets/gimppropwidgets.c : <string.h> for strlen()

	* app/config/gimpconfig.c : on win32 rename always fails
	if the destination file exists. Delete it first.

	* libgimp/gimp.def : removed all '_'-prefixed exports
	* plug-ins/common/iwarp.c : replace _gimp_layer_copy()
	with gimp_layer_copy(), gimp_layer_add_alpha()

	* libgimp/gimpmisc.c : ported gimp_timer funcs to use
	g_timer to be more portable

	* libgimpbase/gimpdatafiles.c : there are no symlinks on
	win32, inverted to #ifndef G_OS_WIN32 as it was meant.

	* libgimpbase/gimpbase.def libgimpmodule/gimpmodule.def
	  libgimpwidgets/gimpwidgets.def : updated externals

	* plug-ins/common/randomize.c plug-ins/common/sinus.c :
	don't initialize more than the defined struct size

	* plug-ins/common/warp.c : removed unneeded unistd.h and
	signal.h include

	* regexrepl/regexrepl.def : (new file) needed to build
	as DLL
2002-12-01 14:53:17 +00:00
Simon Budig 8e64f969a2 fixed the default spacing, so that lines actually look like 1 pixel
2002-09-30  Simon Budig  <simon@gimp.org>

        * data/brushes/1circle.gbr: fixed the default spacing, so that
        lines actually look like 1 pixel lines...

        * themes/Default/images/tools/.cvsignore: Added some files.

        * app/vectors/gimpanchor.h
        * app/vectors/gimpbezierstroke.[ch]
        * app/vectors/gimpstroke.h
        * app/vectors/gimpvectors.h: Added some stuff, mostly unused
        code that otherwise would just rot on my harddisk. Mitch: I
        need to discuss the data structures with you...
2002-09-30 00:06:30 +00:00
Sven Neumann 3aae39405e app/base/Makefile.am automake-1.6 seems to use yet another variable to
2002-06-08  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/paint-funcs/Makefile.am: automake-1.6 seems to use yet another
	variable to pass flags to the assembler (bug #84514). Define
	AM_CCASFLAGS like AM_ASFLAGS to satisfy all versions of automake.

	* configure.in
	* all Makefiles: removed STRIP_BEGIN and STRIP_END since it's a
	GNU make extension that we don't really need and newer versions of
	automake don't seem to like it.
2002-06-07 23:00:46 +00:00
Hans Breuer 31b31bc80d broken pipe ?
2001-05-11  Hans Breuer  <hans@breuer.org>

broken pipe ?
2002-05-10 23:33:26 +00:00
Sven Neumann 9c9b152cc6 some documentation can't hurt.
2002-02-26  Sven Neumann  <sven@gimp.org>

	* app/gui/tips-parser.c: some documentation can't hurt.

	* app/tools/Makefile.am
	* app/paint/Makfile.am
	* app/vectors/Makfile.am
	* plug-ins/tools/Makefile.am: fixed dist target.
2002-02-26 01:06:26 +00:00
Simon Budig 7f706974e8 app/tools/gimpdrawtool.c Added function gimp_draw_tool_draw_strokes to be
2002-02-26  Simon Budig  <simon@gimp.org>

        * app/tools/gimpdrawtool.c
        * app/tools/gimpdrawtool.h: Added function gimp_draw_tool_draw_strokes
        to be able to draw lines from a GimpCoords array.

        * app/vectors/gimpanchor.h: removed "active", since this should
        be a GUI thing.

        * app/vectors/gimpstroke.c
        * app/vectors/gimpstroke.h
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpbezierstroke.h: Implemented (and fixed API) for
        interpolation.

        * app/tools/gimpvectortool.c
        * app/tools/gimpvectortool.h: Changed accordingly, we can actually
        draw polylines now.
2002-02-26 00:58:04 +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
Michael Natterer a4550e9c7d app/vectors/Makefile removed.
2002-02-22  Michael Natterer  <mitch@gimp.org>

	* app/vectors/Makefile
	* app/vectors/Makefile.in: removed.
2002-02-22 12:26: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