Commit graph

16292 commits

Author SHA1 Message Date
Michael Natterer
ca9a9fb498 app: reset the rotation to zero when the shell is emptied
so the next image doesn't appear rotated.
2013-04-21 02:46:17 +02:00
Michael Natterer
81e293cb06 app: don't leak the rotate transform matrices when destroying the shell 2013-04-21 02:40:41 +02:00
Michael Natterer
ee2e5fb517 app: fix image rendering atifacts in rotated views
- stroke around the drawn area to work around the impossibility of
  tiling antialiased stuff.
- don't use the display xfer stuff because if we overdraw we must
  not have anything in the source pattern outside the drawn region
2013-04-21 02:10:36 +02:00
Michael Natterer
47f4bd5508 app: use the reset icon for "Reset to 0°" 2013-04-20 23:56:04 +02:00
Michael Natterer
e98013af34 app: make the rotate angle spinner wrap around, and add a reset button 2013-04-20 23:54:55 +02:00
Michael Natterer
977a194923 app: add a rotate dialog to rotate to exact degrees 2013-04-20 23:22:14 +02:00
Michael Natterer
1a755b2dbe app: add a View -> Rotate menu
Which so far has "Reset", "90°", "-90°" and "180°" entries.
2013-04-20 22:16:50 +02:00
Michael Natterer
855fa3aa4a app: add gimp_display_shell_rotate() and rotate_to() 2013-04-20 22:14:30 +02:00
Michael Natterer
296284fe38 app: rotate cursors that indicate a direction with the view
- reorder enum GimpCursorType to be in angular order
- add gimp_cursor_rotate(cursor_type, angle)
- rotate the shell's cursors automatically in the setter
2013-04-20 17:21:01 +02:00
Michael Natterer
3a75ec3283 app: keep the view rotate angle within [0..360[ 2013-04-20 17:20:18 +02:00
Michael Natterer
f1b5012f23 app: fix gimp_draw_tool_on_handle() on rotated views
Unrotate the display coords, then compare rectangles.
2013-04-20 15:30:23 +02:00
Michael Natterer
b3a9a6a3e3 Bug 55367 - Rotated view of the canvas (view is rotated, not image contents)
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".
2013-04-20 15:11:01 +02:00
Michael Natterer
057ec9ac4a app: remove rectangle parameters from gimp_display_shell_draw_checkerboard()
because the cairo_t is already clipped to the right extents.
2013-04-20 10:47:13 +02:00
Michael Natterer
6b8426874d app: simplify scroll offset calculation for middle-mouse scrolling 2013-04-20 08:37:15 +02:00
Michael Natterer
9785c4e1a3 app: simplify gimp_display_shell_canvas_draw_image() a lot
by not manually intersecting and subtracting regions at all. Simply
clip the cairo_t to the area we want to render, it will automatically
intersect with the clip region from the expose event, and check if the
clip is empty before actually drawing anything.
2013-04-19 02:23:38 +02:00
Michael Natterer
4279023bc6 app: small whitespace fix in gimpdisplayshell-scroll.c 2013-04-18 21:50:29 +02:00
Michael Natterer
c3b53b8b66 app: move the "get scaled image size" functions from shell-draw to -scale 2013-04-18 19:06:17 +02:00
Michael Natterer
afddcce4e5 app: remove gimp_display_shell_update_scrollbars_and_rulers()
and move its two statements to its two callers.
2013-04-18 18:45:55 +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
59c7d42530 app: missed two shell->canvas, use gimp_canvas_item_get_canvas() instead 2013-04-18 16:46:01 +02:00
Michael Natterer
52b92e740f app: rename gimpdisplayshell-style to gimpcanvas-style
because it doesn't and shouldn't depend on GimpDisplayShell at all.
In the future, it will take its defaults from the canvas' theme.
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
Michael Natterer
dc514dd967 app: no need to ask the projection's buffer for its size
when we have the image, they are always exactly the same.
2013-04-18 16:46:00 +02:00
Michael Natterer
65a2d2be31 app: fix copy/paste error in gimp_display_shell_transform_xy() 2013-04-18 16:16:03 +02:00
Michael Natterer
fd6c5dd576 app: port the image and wilber drawing code away from GdkRegion
the changes are simply copied from the gtk3-port branch, reducing the
number of diffs, and enabling hacking on drawing stuff in master while
keeping the branch easily rebasable.
2013-04-18 11:56:43 +02:00
Michael Natterer
810bb18949 app: remove the old rendering increments from struct GimpDisplayShell
and don't use them for (un)transforming integer coordinates. Everything
seems to work fine, but this sort of change has caused off-by-one errors
before, please review.
2013-04-18 02:10:38 +02:00
Michael Natterer
e3557ac3a5 app: remove gimp_gegl_create_apply_[buffer_]node() 2013-04-17 16:21:15 +02:00
Michael Natterer
e2bcad3cfd app: use GimpApplicator in gimp_image_merge_layers() 2013-04-17 16:17:39 +02:00
Michael Natterer
bba89aa87d app: use a GimpApplicator in gimp_drawable_real_apply_buffer() 2013-04-17 14:24:33 +02:00
Michael Natterer
b71ffeca60 app: do more stuff generically in gimp_image_map_tool_initialize()
- reset the config object if it exists
- trigger the first preview of the filter
- remove the same stuff from all subclasses
2013-04-16 23:28:02 +02:00
Michael Natterer
9bb4c3d484 app: pull some GEGL operation logic from subclasses into GimpImageMapTool
- connect to the config object's notify generically and update the preview
- allow to properly exchange the operation at runtime to remove major
  uglyness from GimpOperationTool
- return undo_desc from GimpImageMapTool::get_operation() so we have
  proper strings in the undo history, not always "GEGL operation"
- simplify all get_operation() implementations
2013-04-16 22:06:48 +02:00
Michael Natterer
9994a4d514 app: remove the notify::use-gegl callback from GimpImageMapTool 2013-04-16 20:38:40 +02:00
Michael Natterer
e3b2a54da7 app: add a stock_id to GimpImageMap and use it for its filter
Refactor GimpImageMapTool and GimpOperationTool to set the stock_id,
and to be a bit smarter with the image map's undo string.
2013-04-16 20:32:58 +02:00
Michael Natterer
9504e85a7e app: set an icon on the floating selection filter 2013-04-16 20:30:13 +02:00
Michael Natterer
972b6ef78f app: add a list of filters to the layer options dialog (for debug purposes) 2013-04-16 20:29:18 +02:00
Michael Natterer
2538d6fea7 app: add gimp_drawable_get_filters() which returns the filter stack 2013-04-16 20:20:00 +02:00
Nils Philippsen
b109e05806 app: let the tag popup own its tag objects
This should fix crashes in which tag objects got accessed after they
were disposed, because they still were stored with the popup object.
2013-04-16 11:16:41 +02:00
Michael Natterer
8bfb1769b7 app: use a GimpApplicator for floating selection compositing 2013-04-15 01:44:18 +02:00
Michael Natterer
07a220ee9e app: port GimpImageMap to GimpApplicator 2013-04-14 22:46:52 +02:00
Michael Natterer
69a321ac29 app: turn GimpApplicator into a general-purpose "input + aux -> output" thing
which means adding a lot of proper API. Input, output and aux can be
pads or buffers. Make sure it uses the minimum possible graph in all
cases and doesn't reconfigure nodes unless needed. Port GimpPaintCore
to the new API.
2013-04-14 22:44:21 +02:00
Michael Natterer
1235013177 app: add local "private" variables to make drawable's FS code more readable 2013-04-12 21:07:56 +02:00
Michael Natterer
d1ab98e1c6 app: make GimpImageMap work again when there is no selection 2013-04-12 18:47:12 +02:00
Michael Natterer
38e983c724 app: fix regression: make the selection clip the FS again 2013-04-12 18:26:34 +02:00
Michael Natterer
05e6f6d848 app: simply merge the FS filter with the drawable to anchor the FS 2013-04-12 16:58:18 +02:00
Michael Natterer
39ab59e032 app: add gimp_drawable_get_floating_sel_filter() 2013-04-12 16:57:39 +02:00
Michael Natterer
b16f75b8af app: make the FS' drawable update itself when the active components change
which removes more FS knowledge from the image.
2013-04-12 15:58:42 +02:00
Michael Natterer
538e3813be app: make floating selection compositing honor the image's active components
This was a regression from 2.8
2013-04-12 15:54:05 +02:00
Michael Natterer
1e17f0aed1 app: port GimpImageMap to use the new drawable filters
which makes live update more responsive and removes tons of code, but
adds a delay with progress when finally committing the effect.
2013-04-12 14:35:27 +02:00
Michael Natterer
670fa2d670 app: add gimp_gegl_create_apply_node()
which is simply a more general version of
gimp_gegl_create_apply_buffer_node()
2013-04-12 14:34:20 +02:00
Michael Natterer
dc964956e7 app: add gimp_drawable_merge_filter() which applies a filter to a drawable
permanently, with undo and progress.
2013-04-12 14:31:50 +02:00