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.
Add a transform matrix to GimpCanvasBoundary and get rid of the whole
BoundSeg transform code in boundary.c and gimpbrushcore.c, it was
impossible to get this right on that level. Also fix te extents of
GimpCanvasBoundary os it leaves no artifacts.
- replace gimp_display_shell_selection_control() by undraw() and restart()
which actually say what they are doing
- remove enum GimpSelectionControl
- replace GimpImage::selection_control() by ::selection_invalidate()
because none of the other enum values was used any longer
and use them instead of gimp_display_shell_selection_control() with
the resp. enum values. Remove the GIMP_SELECTION_PAUSE and _RESUME
enums values and thus the presence of this concept in the core.
which is the last bit of non-item drawing of stuff that is not
somehow the image itself... wheee!
This involves reverting commit
6bce0641d4 and adding back all the
vectors handlers that were in gimpdisplayshell-callbacks.c before.
Change the callbacks to manage proxy items for all the image's
vectors.
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.
of the guide and sample point canvas items. They are too obscure to
additionally hide them, and these items are used rarely enough to
justify the additional parameter to the new() functions.
Before, the pattern offset was always relative to the widget, which
completely destroyed the stipples when the got scrolled in. Now we
simply set the shell's scroll offsets as cairo translation and
everything looks perfect.
and use it to draw the layer boundary. Remove a lot of stuff
that was there only to draw the boundary before:
- remvoe all layer boundary stuff from the selection code
- remove gimp_display_shell_draw_layer()
- remove enum values GIMP_SELECTION_LAYER_ON,OFF from core-enums.h
- remove all lines calling gimp_image_selection_control() with
the removed enum values
- remove gimp_layer_boundary()
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.