Added complete API for zoom/unzoom (scale and scroll) and
rotate/unrotate, with the same set of functions as the existing
transform/untransform. Moved some special case functions to the
namespaces they belong.
First version of display rotation, inspired by gimp-painter.
The rotation always happens around the image's center.
The only "UI" for rotating is currently shift+middle-drag and
shift+space-drag. Control constrains the angle to 15 degrees
and is currently the only way to go back to "no rotation".
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.
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.
and use it to set visibility of guides and sample points, so this
reression is fixed.
- return NULL extents for invisible items and never draw them
- do nothing for invisible items in more places, like the group
While hacking this, it turned out that it was a braino to collect an
item's region before and after a change in
dispatch_properties_changed(), so a new update had to be devised:
- add a "change count" and new API begin_change()/end_change()
- in begin_change(), remember the item's extents before the change
- in end_change(), combine old and current extents and emit "update"
- add some protected function to emit "update", and to figure if
it makes sense at all to emit "update" on an item.
because constructing the region can be expensive. Also make sure not
to use g_object_set() if nothing would change to further reduce
"update" emissions.
which gets emitted when the item wants to be redrawn:
- Emit "update" it when any item property changes
- Groups connect to their children and forward "update" for them
- The shell connects to its group of canvas items and exposed
the affected area
- Remove gimp_display_shell_expose_item()
- Move all the shell's item group code into gimpdisplayshell-items.c
In order to avoid visually overlapping lines:
- GimpCanvasItem got a "suspend_stroking" API that allows to skip
stroking and instead starts a new sub-path
- GimpCanvasGroup got a "group_stroking" API that sets suspend_stroking
on all its children and does one stroke after calling all items'
draw().