Commit Graph

15 Commits

Author SHA1 Message Date
Alx Sa 1f5a5812dd libgimpcolor: Remove unnecessary GimpRGB Cairo functions
gimp_cairo_set_source_rgb () and
gimp_cairo_set_source_rgba () are no longer
used in the code base, so let's remove them
as part of the move to GeglColor.
2024-08-17 14:37:10 +00:00
cheesequake 63a134a2b2 Issue #11021: cairo-ARGB32 uses "associated alpha", so changed the new formats accordingly. 2024-04-03 03:12:12 +05:30
Alx Sa 99e0446dfd libgimpcolor: Port gimp_cairo_checkerboard_create ()...
to GeglColor.
2024-03-31 01:09:45 +00:00
Alx Sa d4af93b256 libgimpcolor: Fix CAIRO_FORMAT_RGB96F babl format
As noted by Idriss, this should most likely be R'G'B' instead.
2024-03-08 20:56:32 +00:00
Jehan e992ca3e51 app, libgimp, pdb, plug-ins: GimpText* using GeglColor.
One of the big improvement in this commit is that text layers are now much
better at space accuracy. They were already space-aware, yet rendered as sRGB u8
only before being converted to the image's space. It means that text layers had
the following limitations:

* Any color out of sRGB gamut were trimmed.
* Precision was always 8-bit (even if the image was high-bit depth).

Now GimpTextLayout keeps track of its source space (for RGB and CMYK only, this
won't be as easy when we will support more backend, since Cairo has only RGB
support for image data) and the image TRC (in case it bypasses the color space's
TRB) and it draws within this gamut and space.
It means first that we are not limited to sRGB colors; we will draw text main
color in the full image gamut, with still 2 remaining limitations:

* Unbounded colors are impossible because Pango format (to color text) uses
  hexadecimal (so even with half/float images, you can't draw out-of-gamut text
  unfortunately).
* Main color precision is still 8-bit, yet a tiny bit better than before as we
  at least follow TRC (so we avoid some of the precision loss when converting,
  even though the bit-depth is still the biggest loss).

The outline color on the other hand is drawn through Cairo API entirely, in
float. This means that the outline color will now be without any precision loss.

Note that this depends on CAIRO_FORMAT_RGBA128F which is only available since
Cairo 1.17.2 which is not in Debian bookworm (our current baseline for GIMP
3.0). It means that the old precision will still happen with older Cairo
version, as determined by #if code at compilation.
2024-02-11 23:28:02 +01:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Jehan 8c978f4301 libgimpcolor: some more (transfer) annotations. 2019-07-31 23:55:07 +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
Jehan 85c0373489 libgimpcolor: support CAIRO_FORMAT_A8 in gimp_cairo_surface_get_format() 2017-06-16 16:42:39 +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 6b40652d07 libgimpcolor: add some missing API docs 2015-05-31 02:47:24 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer b3e785e5e5 libgimpcolor: return the right format from gimp_cairo_surface_get_format() 2012-05-03 04:19:41 +02:00
Michael Natterer 00b3a9c745 libgimpcolor: add Cairo <-> GEGL utility functions from app/ 2012-05-03 04:07:16 +02:00
Michael Natterer d766ec6ae9 libgimpcolor: rename gimpcairocolor.[ch] to gimpcairo.[ch] 2012-05-03 03:56:10 +02:00