Commit Graph

21 Commits

Author SHA1 Message Date
Ell 3b0040c043 app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:39:56 -04: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 48f6d1b8ee app: avoid scaling GimpCanvasArc to zero, it causes a non-invertable matrix 2018-05-04 11:48:44 +02:00
Ell efa8040780 app: rename gimp_cairo_foo() functions to follow cairo naming scheme
Really pedantic stuff :)  Rename the functions in gimp-cairo.h to
follow the naming scheme employed by cairo, so that they don't feel
out of place.
2018-03-07 06:18:20 -05:00
Michael Natterer 9d042e4de9 app: add gimp_canvas_arc_set() 2017-06-27 00:46:24 +02:00
Téo Mazars 7a0f8ad78e Bug 701410 - Small artifacts appear when performing a selection
Do not allow negative radius.
2013-06-21 20:17:01 +02:00
Michael Natterer 0add37a6cc app: remove GimpDisplayShell parameters from all GimpCanvasItem vfuncs
and get the shell from gimp_canvas_item_get_shell() if needed.  Remove
some cairo_translate() that didn't have any effect and were leftovers
from a very early canvas item code.
2013-04-18 16:46:01 +02:00
Michael Natterer 64c929a1d1 app: add an own GimpCanvasItem API for transforming coords
and use it in all subclasses. Removes all gimpdisplayshell-transform
dependency from all item implementations.
2013-04-18 16:46:00 +02:00
Mikael Magnusson f6f22ed431 Remove stray semicolons 2012-08-20 15:22:20 +02:00
Massimo Valentini 1338bba7db Bug 645345: 'Color Management' display filter causes performance problems 2012-06-09 15:36:53 +02:00
Michael Natterer 53cf2c657b app: move the GTK-free cairo utility functions to core/gimp-cairo.[ch] 2012-05-02 17:51:02 +02:00
Michael Natterer fde934ac58 app: s/GdkRectangle/cairo_rectangle_int_t/ in all GimpCanvasItems 2011-04-10 18:15:16 +02:00
Michael Natterer cad5c1e2fb app: indentation in GimpCanvasArc 2011-04-10 03:44:49 +02:00
Michael Natterer 60d24b4c04 app: get rid of #ifdef USE_CAIRO_REGION almost everywhere
get replaced by GDK region functions and use the cairo region
functions unconditionally all over the place.
2010-10-22 19:58:11 +02:00
Michael Natterer 479082075b app: use cairo_region_t for canvas items if cairo >= 1.10 is available
This is a gross hack that typedefs around between GdkRegion and
cairo_region_t and has some evil #ifdefs. This is going to die
immeditately once we can depend on cairo 1.10.
2010-10-18 20:01:05 +02:00
Michael Natterer b74811324a app: don't use PROJ_ROUND() for pixel-adjusting canvas item drawing
When PROJ_ROUND()ing e.g. 3.8, it ends up at 4, then we added the 0.5
offset to draw a nice cairo line in the middle of the pixel,
effectively drawing a line that's meant to be at 3.8 at 4.5.  Instead,
we now use floor(x)+0.5 now which snaps the above example to 3.5.

Also, calculate arcs like we calculate rectangles (transform the arc's
bounding box and pixel-align that, then recalculate the center), so
arcs properly align with rectangles.
2010-10-04 21:48:39 +02:00
Michael Natterer d3f19baf0d app: remove "shell" parameter from GimpCanvasItem's public APIs
because each item has a shell now. Keep the parameter in the virtual
functions though because that saves a lot of code in the subclasses.
2010-10-01 14:54:53 +02:00
Michael Natterer 201bfe3e25 app: add a "shell" property to GimpCanvasItem
and pass it to all constructors. The GimpDisplayShell is needed
because items are going to become more powerful soon.
2010-10-01 14:13:45 +02:00
Michael Natterer e8d46f7098 app: fix GimpCanvasArc's extents so it doesn't leave artifacts 2010-09-24 22:55:54 +02:00
Michael Natterer 9c7cd6d41c app: fix canvas arc extents 2010-09-24 18:54:50 +02:00
Michael Natterer 4e5d47dcbf app: add an arc canvas item class 2010-09-24 18:41:57 +02:00