Commit Graph

119 Commits

Author SHA1 Message Date
Niels De Graef 7473b24492 libgimpmath: Fix some vector gi-docgen annotations 2021-12-28 23:54:31 +01:00
Niels De Graef 5ca9a38ea4 Fix some gobject-introspection annotations 2021-12-02 12:46:05 +01:00
Jehan 49e534247a app, libgimp*, pdb, plug-ins: use g_memdup2() instead of g_memdup()
Since it appeared with GLib 2.68.0, we could not change this until we
bumped the dependency which has only become possible a few days ago
(since Debian testing is our baseline for dependency bumps). Cf.
previous commit.

As this is a drop-in replacement (just a guint parameter changed to
gsize to avoid integer overflow), search-and-replace with:

> sed -i 's/g_memdup\>/g_memdup2/g' `grep -rIl 'g_memdup\>' *`

… followed by a few manual alignment tweaks when necessary.

This gets rid of the many deprecation warnings which we had lately when
building with a recent GLib version.
2021-08-26 17:32:09 +02:00
Niels De Graef 9c9e310a67 gir: Add missing annotations
Otherwise we won't be able to generate proper API for our bindings
2020-05-04 02:11:57 +02:00
qarmin fc0d2d9ce7 Fixed copy paste error in gimp_vector3_copy 2020-04-30 14:03:53 +00:00
Ell 75838a59a8 libgimpmath: fix unsorted line in gimpmath.def 2020-02-16 00:34:17 +02:00
Ell 006f300fff libgimpmath: add gimp_matrix3_equal()
... which compares two matrices.
2020-01-16 00:23:55 +02:00
Ell 0271f4c861 libgimpmath: add version annotations to new matrix functions 2020-01-15 18:24:20 +02:00
Ell 9d015b7b1a libgimpmath: add new matrix functions to .def file
... and fix docs for gimp_matrix4_transform_point().
2020-01-07 10:03:26 +02:00
Ell e3bc877a42 libgimpmath: add various GimpMatrix4 functions
Add gimp_matrix4_{identity,mult,transform_point}().
2020-01-06 21:49:57 +02:00
Ell edfc837e7d libgimpmath: add various GimpMatrix2 functions
Add gimp_matrix2_{determinant,invert,transform_point}().
2020-01-06 21:49:57 +02:00
Niels De Graef cc21ec304f libgimpmath: Use G_DEFINE_BOXED_TYPE()
This isn't any functional change, but allows us to get rid of some of
the GObject boilerplate.
2019-11-05 10:14:29 +00:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00
Jehan 2dde79b3e7 libgimp*: move GObject Introspection into libgimp/.
libgimp is anyway processed at the very end after all other libgimp*
were built. This way, it also fixes #3746, by removing the $(top_srcdir)
everywhere from introspected files, hence making the build work again
with older automake.
2019-08-08 15:59:44 +02:00
Jehan 4a6b58507b libgimp, libgimpmath, libgimpwidgets: update def files.
So many things moved in the last few days, and we just didn't think of
updating these.
2019-08-05 16:55:35 +02:00
Jehan f4f63dad9c libgimpmath: remove gimpmath.h from introspection.
This header is just full of macros and GI doesn't introspect macros
anyway. Yet it was still bothering us with warnings.
2019-08-05 16:43:30 +02:00
Michael Natterer cc8fc0f90f libgimp*: add GI's .dirstamp to .gitigore 2019-08-03 19:50:17 +02:00
Jehan 3a4b17e8b5 libgimpmath: make GimpVector[23] boxed types.
This way, all functions using these types are now introspectable.
2019-08-02 03:47:23 +02:00
Jehan 6fe2508301 libgimp*: fix various missing (transfer) annotations. 2019-08-01 01:52:07 +02:00
Jehan fb4c86a660 libgimp*: make more libgimp* libraries introspected.
Only libgimpwidgets is not introspected yet as it didn't work from
scratch and I don't have the time right now to look into it. Anyway with
all the others, we already have so many warnings during the GObject
Introspection step now that we have a lot of work to do already!
2019-07-27 20:25:20 +02:00
Jehan 4dc45f9658 libgimpmath: fix typo in various places: s/orthognal/orthogonal/. 2018-09-20 18:10:45 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 7990b1d57c libgimp: update all .def files 2018-05-25 22:13:33 +02:00
Michael Natterer 74d78e7009 libgimpmath: remove all deprecated cruft 2018-05-20 21:06:29 +02:00
Ell 23f6369658 libgimpmath: remove gimp_matrix3_will_explode()
It's no longer needed since last commit, and since it's new in
2.10, we might as well remove it.

This reverts the rest of 768d06614f.
2018-01-28 16:37:34 -05:00
Ell e9f45798d0 libgimpmath: add SAFE_CLAMP() macro
The SAFE_CLAMP() macro is similar to CLAMP(), however, its result
is always within the specified range, even if the input is NaN.
2017-11-19 07:12:28 -05:00
Ell 80a526861f Bug 788461 - Selection with a Fixed size is created with an ...
... off-by one size in special cases

The last commit wasn't drastic enough.  We changed SIGNED_ROUND()
to use RINT(), which, in turn, may use rint().  However, rint()
effectively breaks ties to even, so that we get stuff like
'rint (1.5) - rint (0.5) == 2.0 - 0.0 == 2.0'.  This can't be
good--it's entirely possible that we're bitten by this in other
cases without noticing.

Avoid rint() entirely in RINT(), and always use 'floor (x) + 0.5'
instead, which always breaks ties up.  Hopefully, this doesn't
break anything else...
2017-10-05 17:50:07 -04:00
Ell e8b37a7a25 Bug 788461 - Selection with a Fixed size is created with an ...
... off-by one size in special cases

SIGNED_ROUND(), which is used by GimpToolRectangle, among other
things, used to round negative values which lie exactly between
two integers, i.e., -foo.5, down.  This could lead to the rectangle
being one pixel bigger than expected, in either dimension, when one
of its edges had a negative coordinate, and the opposite edge had a
positive coordinate.

Fix SIGNED_ROUND() to always round such values up, regardless of
sign.
2017-10-05 16:16:09 -04:00
Michael Natterer caef6d0deb libgimp*: various doc fixes 2017-06-03 21:22:12 +02:00
Alexis Wilhelm 768d06614f Bug 316479 - The Perspective Tool creates an empy image...
...instead of transforming it

Add gimp_matrix3_will_explode() which determines if a transform
matrix will blow up something in a rectangle to infinity, and use
the function so set both the GIMP and GEGL code paths to clip the
transform to the input size.
2016-11-08 17:26:21 +01:00
Michael Natterer f5ecc53f3e Fix a lot of warnings all over the place
Deprecated stuff, unused variables. Includes parts of a patch from
Shlomi Fish from bug #768855.
2016-10-31 01:36:35 +01: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 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Michael Natterer 24da0007a4 libgimp*: some API doc fixes 2015-05-31 14:40:20 +02:00
Jehan 8c1cd7caac Makefile: fix VPATH builds for win32. 2014-09-14 18:28:26 +02:00
Michael Natterer 06b2dd35c2 libgimpmath: fix formatting in gimpmatrix.h 2014-07-14 22:55:26 +02:00
Daniel Sabo b54b59c9e8 Use EXTRA_foo_DEPENDENCIES for adding .def files
The foo_DEPENDENCIES rule replaces the default dependencies, where
EXTRA_foo_DEPENDENCIES just appends to it. This was causing libgimp
and libgimpui to build out of order.
2014-03-15 14:23:38 -07:00
Michael Natterer 13ee151a1e libgimp*: use LIBADD and DEPENDENCIES consistently in all Makefiles 2014-03-14 22:39:51 +01:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Téo Mazars 4a5a6ef914 Bug 684330 - Rectangle tool's "fixed size" option is off-by-one
ROUND() is consistent only on positive values, and bad rounding
creates an offset when negative values are involved. Introduce
SIGNED_ROUND() and use it in gimprectangletool.c. It should probably
be used in much more places.
2013-02-13 00:08:39 +01:00
Michael Natterer 486e76bdab libgimp*: use GIMP_API_VERSION in Makefile.am instead of hardcoding 2.0 2012-05-04 15:38:45 +02:00
Michael Natterer 0d481702c7 libgimp*: add GIMP_DEPRECATED macros using G_DEPRECATED
and start using them instead of GIMP_DISABLE_DEPRECATED where possible.
2012-05-03 00:54:21 +02:00
Michael Natterer 056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00
Michael Natterer 844df2b4df libgimp*: add guards that #error out if individual files are included
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.

The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
2011-04-28 14:30:41 +02:00
Michael Natterer b2aad5ef14 libgimpmath: move the GipmVector and GimpMatrix structs to gimpmathtypes.h
in order to get rid of the need to include gimpvector.h and
gimpmatrix.h in global places just to make the structs generally
known.
2011-04-28 13:25:25 +02:00
Michael Natterer 1e11a279b2 libgimpmath: add a boxed type and a GParamSpec for GimpMatrix3 2011-03-27 21:13:31 +02:00
Martin Nordholts e1b8f8efdf libgimpmath: Update gimpmath.def 2010-11-07 15:02:08 +01:00
Alexia Death d2563a69fd app: Cleanup in preparation of merge 2010-11-04 20:27:11 +02:00
Alexia Death aee148a486 Merge branch 'master' into soc-2010-cage-2 2010-08-26 21:50:55 +03:00
Michael Muré 7655a45d61 gimpvector: correct normal vector computing, vector wasn't normilized 2010-08-14 21:24:59 +02:00