Commit Graph

100 Commits

Author SHA1 Message Date
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
luz.paz 7fdb963e01 Bug 794996 - Misc. typo fixes in comments in app/
Found via `codespell -q 3 --skip="./po*"`
2018-04-08 21:25:56 +02:00
Ell dee7dbc399 app: subdivide perspective-transformed Bezier curves
The result of applying a perspective-transform to a Bezier curve is
only an approximation.  When the curve is highly nonlinear, the
result may diverge significantly from the real transformed curve.

Subdivide the curve as necessary in gimp_transform_bezier_coords()
to counter that.  Adjust gimp_bezier_stroke_transform()
accordingly.
2018-02-04 14:45:24 -05:00
Ell 53f7da0408 app: fix a few comments in last commits 2018-02-03 10:15:03 -05:00
Ell 823791164c app: use gimp_transform_bezier_coords() when transforming a GimpBezierStroke
Override GimpStroke::transform() for GimpBezierStroke, using
gimp_transform_bezier_coords() to transform the stroke's segments,
so that clipping done properly.
2018-02-03 05:58:43 -05:00
Ell 275815c808 app: misc cleanup in gimpcoords-interpolate
Fix indentation, typos, style.  Use array parameters for the
control points, instead of using individual by-value parameters.
Use GArray* for the results, instead of GArray**.  Verify
arguments.

Adapt the rest of the code to the changes.
2018-02-03 05:58:42 -05:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Michael Natterer 28e1a379e6 app: remove const qualifiers from all object parameters
They are unreliable because every type checking cast discards them,
they are useless anyway, visual clutter, added inconsistently, and
generally suck. Wanted to do this a long time ago, it was a bad idea
in the first place.
2016-05-19 23:54:14 +02:00
Simon Budig b3e4212dfe app/vectors: fix up the anchors types which I messed up with my last change. 2016-02-01 12:37:04 +01:00
Simon Budig 1e47343b04 Bug 735810- performance shrinkage of Paths tool
Apply revised version of Mitchs patch that
changes the anchor list to a GQueue.
2016-01-29 01:00:03 +01:00
Clayton Walker 76bdbf6d8f app: I actually tested it this time 2013-06-23 13:39:18 +02:00
Clayton Walker fb1d220a3f app: fix previous commit 2013-06-23 13:24:45 +02:00
Clayton Walker 03f559923b app: properly initialize more variables
Found by Coverity
2013-06-23 13:10:44 +02:00
Mikael Magnusson 0091645129 app: remove pointless NULL checks 2013-06-16 01:31:13 +02:00
Simon Budig 4852e59ec1 remove some disabled nonfunctional code with german comments. 2013-06-15 22:17:48 +02:00
Ville Skyttä 6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
Mukund Sivaraman e05af3cafb app (vectors): Delete dead assignments 2011-10-08 18:22:06 +05:30
Michael Natterer c35ff719a7 app/libgimp*: remove stuff found by -Wunused-but-set-variable 2011-05-01 23:23:19 +02:00
Michael Natterer 8b4870dad7 app: move GimpBezierDesc from app/vectors/ to app/core/ 2011-04-04 18:40:12 +02:00
Michael Natterer a16fc33c43 app: add new() copy() and free() API around GimpBezierDesc
and use it instead of manually (de)allocating. Will also be used in a
new canvas path item.
2010-10-06 22:37:07 +02:00
Sven Neumann 31fb4c9559 app: use GSlice for GimpBezierDesc 2010-09-16 23:27:25 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann e25c82e21a Applied patch from Alexia Death as attached to bug #471344:
2008-10-18  Sven Neumann  <sven@gimp.org>

	Applied patch from Alexia Death as attached to bug #471344:
	
	* app/core/Makefile.am
	* app/core/gimpcoords-interpolate.[ch]: new files with
	interpolation code taken from ...

	* app/vectors/gimpbezierstroke.c: ... here.

	* app/Makefile.am (AM_LDFLAGS): make it link.


svn path=/trunk/; revision=27314
2008-10-18 18:46:15 +00:00
Sven Neumann be7d770ad3 template can be const
svn path=/trunk/; revision=26273
2008-07-22 10:56:35 +00:00
Sven Neumann 06d13d4bb5 formatting.
2008-07-22  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpbezierstroke.c: formatting.


svn path=/trunk/; revision=26272
2008-07-22 10:53:08 +00:00
Sven Neumann 1acaf94143 formatting.
2008-07-17  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpbezierstroke.c: formatting.


svn path=/trunk/; revision=26228
2008-07-17 19:49:40 +00:00
Sven Neumann 15033a594b app/core/gimpscanconvert.c app/vectors/gimpbezierstroke.c
2008-07-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.c
	* app/vectors/gimpbezierstroke.c

	* app/vectors/gimpvectors.c: include <cairo.h> instead of
	<cairo/cairo.h>.


svn path=/trunk/; revision=26121
2008-07-11 10:37:58 +00:00
Simon Budig 80039486aa app/vectors/gimpvectors.[ch] app/vectors/gimpstroke.[ch] Implement
2008-05-12  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpvectors.[ch]
	* app/vectors/gimpstroke.[ch]
	* app/vectors/gimpbezierstroke.c: Implement functionality to
	get a bezier description a la moveto/curveto/closepath.

	* app/vectors/vectors-types.h: implement an evil hack to avoid
	the inclusion of cairo.h in most C files...

	* app/vectors/Makefile.am: link against cairo

	* app/widgets/gimpviewrenderervectors.c: use the new functionality
	for preview rendering.


svn path=/trunk/; revision=25645
2008-05-12 21:47:07 +00:00
Simon Budig 2aada50eaf Fix initialization of the delta vectors. Fixes bug #473515
2007-09-04  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: Fix initialization of the
	delta vectors. Fixes bug #473515


svn path=/trunk/; revision=23464
2007-09-04 12:10:28 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Michael Natterer cc4badb87b define GIMP_COORDS_DEFAULT_VALUES, a struct initializer for GimpCoords.
2006-03-19  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: define GIMP_COORDS_DEFAULT_VALUES, a
	struct initializer for GimpCoords.

	* app/core/gimpimage-snap.c
	* app/paint/gimppaintcore-stroke.c
	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpvectors-compat.c
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: use it here.

	* app/pdb/paint_tools_cmds.c
	* app/pdb/vectors_cmds.c: regenerated.
2006-03-19 13:39:10 +00:00
Simon Budig 3c257b69ba extended gimp_bezier_stroke_new_ellipse() with an "angle" parameter.
2005-12-29  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.[ch]: extended
	gimp_bezier_stroke_new_ellipse() with an "angle" parameter.
	* app/vectors/gimpvectors-import.c: changed accordingly, untabbified.

	* tools/pdbgen/pdb/vectors.pdb: added PDB-wrappers for
	      vectors_bezier_stroke_new_moveto
	      vectors_bezier_stroke_lineto
	      vectors_bezier_stroke_conicto
	      vectors_bezier_stroke_cubicto
	      vectors_bezier_stroke_new_ellipse

	Undo does not work properly yet.

	* app/pdb/internal_procs.c
	* app/pdb/vectors_cmds.c
	* libgimp/gimpvectors_pdb.[ch]: regenerated.
2005-12-29 16:05:31 +00:00
Simon Budig 14d43a50d2 app/vectors/gimpbezierstroke.c shuffled some g_return*_if_fail around as
2005-12-23  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpstroke.c: shuffled some g_return*_if_fail
	around as suggested by mitch.
2005-12-23 00:37:42 +00:00
Michael Natterer 0d4a10fee4 app/config/*.c app/core/*.c app/display/*.c app/text/*.c port to
2005-12-10  Michael Natterer  <mitch@gimp.org>

	* app/config/*.c
	* app/core/*.c
	* app/display/*.c
	* app/text/*.c
	* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
	core reordering and cleanup.
2005-12-10 19:24:36 +00:00
Simon Budig 9108905524 Don't leak lots of g_arrays...
2005-10-02  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: Don't leak lots of g_arrays...
2005-10-02 01:15:52 +00:00
Simon Budig 7b21586f0e fixed the bogus snaps. One should not calculate tangents for points beyond
2005-10-02  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: fixed the bogus snaps. One
	should not calculate tangents for points beyond the end of the
	array...
2005-10-02 01:08:46 +00:00
Simon Budig 3b0594c429 a segment doesn't necessarily have a matching tangent. Check for this when
2005-10-02  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: a segment doesn't necessarily
	have a matching tangent. Check for this when iterating over all
	segments of a path...

	* app/vectors/gimpstroke.c: fix the dispatch of
	_nearest_intersection_get().
2005-10-02 00:25:06 +00:00
Simon Budig e57ad0f8d0 correctly pass back the nearest coordinate. Snapping sortof works.
2005-10-02  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: correctly pass back the
	nearest coordinate. Snapping sortof works.
2005-10-01 23:38:07 +00:00
Simon Budig 5a43a464d2 use ABS instead of fabs.
2005-10-02  Simon Budig  <simon@gimp.org>

	* app/core/gimpcoords.c: use ABS instead of fabs.

	* app/core/gimpimage-snap.c: Use proper default values for the
	coordinates.

	* app/vectors/gimpbezierstroke.c: Fix a bug plus add some debug
	output. For some reason does not snap yet.
2005-10-01 23:19:42 +00:00
Simon Budig 3c2e94a2fb Added small utility function for the manhattan metric.
2005-10-01  Simon Budig  <simon@gimp.org>

	* app/core/gimpcoords.[ch]: Added small utility function for the
	manhattan metric.

	* app/vectors/gimpstroke.[ch]: virtualized stubs provided by mitch

	* app/vectors/gimpbezierstroke.c: Reworked some internal functions
	to make it easier to access the parameters for the coordinates of an
	stroke interpolation. Simplified the straight line test. Added an
	implementation of the _nearest_tangent_get () function that does
	not yet seem to work properly. Not sure where the problem is.
2005-10-01 00:49:44 +00:00
Manish Singh 5d01581069 Fix a bunch of warnings from Sparse:
2004-11-13  Manish Singh  <yosh@gimp.org>

        Fix a bunch of warnings from Sparse:

        * app/actions/dockable-commands.c
        * app/actions/layers-actions.c
        * app/actions/view-commands.c
        * app/base/pixel-surround.c
        * app/config/gimpconfig-utils.c
        * app/config/gimpscanner.c
        * app/core/gimpbrushgenerated.c
        * app/core/gimpcontainer.c
        * app/core/gimpimage.c
        * app/dialogs/palette-import-dialog.c
        * app/file/gimprecentlist.c
        * app/plug-in/plug-in-params.c
        * app/text/gimptext-compat.c
        * app/text/gimptext-parasite.c
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpstroke.c
        * app/widgets/gimpcellrendereraccel.c
        * app/widgets/gimpselectiondata.c
        * app/xcf/xcf.c
        * libgimp/gimp.c
        * libgimpthumb/gimpthumb-utils.c
        * libgimpthumb/gimpthumbnail.c
        * modules/cdisplay_proof.c
        * plug-ins/Lighting/lighting_ui.c
        * plug-ins/common/csource.c
        * plug-ins/common/glasstile.c
        * plug-ins/common/nova.c
        * plug-ins/common/pcx.c
        * plug-ins/common/pnm.c
        * plug-ins/common/randomize.c
        * plug-ins/common/screenshot.c
        * plug-ins/common/sel_gauss.c
        * plug-ins/common/spheredesigner.c
        * plug-ins/common/wind.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gimpressionist/gimpressionist.c
        * plug-ins/ifscompose/ifscompose.c
        * plug-ins/print/gimp_main_window.c
        * plug-ins/print/print.c: Cleanup integer vs. pointer confusion.

        * app/base/temp-buf.c
        * app/dialogs/about-dialog.c
        * plug-ins/common/bumpmap.c
        * plug-ins/common/jigsaw.c
        * plug-ins/gfig/gfig-dobject.c: Cosmetic cleanups.

        * app/config/gimpconfig-deserialize.c
        * app/config/gimpconfig-path.c
        * app/config/gimpconfigwriter.c
        * app/core/gimpgradient.c
        * app/tools/gimpdrawtool.c
        * plug-ins/common/nlfilt.c
        * plug-ins/common/unsharp.c
        * plug-ins/common/zealouscrop.c: Define inline functions before they
        are used.

        * app/core/gimpdrawable-blend.c: PixelRegion definition was changed
        some time ago, but the initialization here didn't change. Fix it.

        * app/plug-in/plug-in-rc.c (plug_in_extra_deserialize): No need to
        assign token twice in a row.

        * libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories): No
        need to initialize file_data, since the code fills out all the fields.

        * plug-ins/common/CML_explorer.c
        * plug-ins/common/vpropagate.c: Declare function pointers fully.

        * plug-ins/common/grid.c (pix_composite): G_INLINE_FUNC isn't needed,
        we assume we can use the "inline" keyword always.

        * plug-ins/common/psd_save.c
        * plug-ins/common/vinvert.c
        * plug-ins/gfig/gfig-arc.c
        * plug-ins/gfig/gfig-bezier.c
        * plug-ins/gfig/gfig-circle.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gfig/gfig-ellipse.c
        * plug-ins/gfig/gfig-line.c
        * plug-ins/gfig/gfig-poly.c
        * plug-ins/gfig/gfig-spiral.c
        * plug-ins/gfig/gfig-star.c
        * plug-ins/gfig/gfig.c
        * plug-ins/gimpressionist/orientmap.c
        * plug-ins/gimpressionist/placement.c
        * plug-ins/gimpressionist/sizemap.c
        * plug-ins/imagemap/imap_grid.c
        * plug-ins/imagemap/imap_main.c
        * plug-ins/imagemap/imap_preferences.c
        * plug-ins/imagemap/imap_settings.c
        * plug-ins/maze/maze.c
        * plug-ins/sel2path/curve.c
        * plug-ins/sel2path/fit.c
        * plug-ins/sel2path/pxl-outline.c
        * plug-ins/sel2path/spline.c
        * plug-ins/xjt/xjt.c: Functions with no args should be declared
        with (void).

        * plug-ins/common/retinex.c (MSRCR): Initialize max_preview to quiet
        the compiler.
2004-11-14 02:50:33 +00:00
Simon Budig e86dff66da Implemented the ellipse basic shape differently to avoid possible rounding
2004-08-22  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpbezierstroke.c: Implemented the ellipse basic
	shape differently to avoid possible rounding issues with
	the _arcto () command.

	* app/vectors/gimpvectors-import.c: properly close the rounded
	rectangles.
2004-08-22 12:31:47 +00:00
Sven Neumann 59e521c64f fixed a bug I introduced with my last commit.
2004-08-21  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpbezierstroke.c (gimp_bezier_stroke_arcto): fixed
	a bug I introduced with my last commit.

	* app/vectors/gimpvectors-import.c: added support for the basic
	SVG shape "rect". Fixed handling of SVG lengths in basic shapes.
2004-08-21 15:47:31 +00:00
Sven Neumann 6f3c1ae503 added new function gimp_bezier_stroke_new_ellipse() that provides a simple
2004-08-21  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpbezierstroke.[ch]: added new function
	gimp_bezier_stroke_new_ellipse() that provides a simple API to
	create a bezier stroke that represents an ellipse.

	* app/vectors/gimpvectors-import.c: added support for the basic
	SVG shapes "circle" and "ellipse".
2004-08-21 13:50:19 +00:00
Sven Neumann bcc27d8e8d moved array initialization out of variable declaration (bug #144632).
2004-06-19  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpbezierstroke.c (arcto_ellipsesegment): moved
	array initialization out of variable declaration (bug #144632).
2004-06-19 10:44:54 +00:00
Sven Neumann ef5d371d83 use G_SQRT2 to make circlemagic a constant value so we can initialize the
2004-06-19  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpbezierstroke.c (arcto_ellipsesegment): use
	G_SQRT2 to make circlemagic a constant value so we can initialize
	the array on declaration. Fixes bug #144632.
2004-06-19 09:20:36 +00:00
Simon Budig cb777787ed renamed gimp_coords_length2 to gimp_coords_length_squared.
2004-06-09  Simon Budig  <simon@gimp.org>

	* app/core/gimpcoords.[ch]: renamed gimp_coords_length2 to
	gimp_coords_length_squared.

	* app/vectors/gimpbezierstroke.c: Changed accordingly
2004-06-09 12:44:13 +00:00
Michael Natterer 0d05d1e794 app/vectors/Makefile.am removed...
2004-05-24  Michael Natterer  <mitch@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/gimpcoordmath.[ch]: removed...

	* app/core/Makefile.am
	* app/core/gimpcoords.[ch]: ...and added without the "bezier"
	namespace.

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

	* app/Makefile.am: force it to link gimpcoords.o
2004-05-24 16:45:24 +00:00
Simon Budig 70671753ae app/base/cpu-accel.c app/display/gimpdisplayshell-dnd.c
2004-03-10  Simon Budig  <simon@gimp.org>

	* app/base/cpu-accel.c
	* app/display/gimpdisplayshell-dnd.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpvectors-import.c: Removed, disabled or
	conditionalized some debug output.

	There still is debug output when pushing/popping the move tool
	via space bar. Mitch wanted to look at that.
2004-03-10 15:10:34 +00:00