Commit graph

13528 commits

Author SHA1 Message Date
Michael Natterer e7de19ed2f app: remove debug spew in the draw tool 2010-09-22 22:26:41 +02:00
Michael Natterer 919b3d83b8 app: enable cairo drawing in the blend tool
and reorder drawing functions so the handles are on top of the line.
2010-09-22 22:25:37 +02:00
Michael Natterer 55369b5f22 app: enable cairo drawing in the zoom tool 2010-09-22 22:25:09 +02:00
Michael Natterer 1ea16c0770 app: draw the active tool's stuff in the display expose handler 2010-09-22 22:24:22 +02:00
Michael Natterer 683e097d89 app: add cairo drawing support in GimpDrawTool
- add boolean "use_cairo" toggle to enable it per tool
- split draw() in draw() and undraw() and add cairo variants of drawing
- create canvas items in draw_line(), draw_handle() and draw_rectangle()
- some related changes
2010-09-22 22:19:28 +02:00
Michael Natterer 284403d99e app: fix width and height properties to allow negative sizes 2010-09-22 21:45:33 +02:00
Michael Natterer 5722345cc7 app: remove prototype for non-existing gimp_draw_tool_set_transform() 2010-09-22 21:02:38 +02:00
Michael Natterer 24654e0df3 app: remove the draw timeout from GimpDrawTool
This slows down painting again, but it's in the way of refactoring so
the slowdown is temporary.
2010-09-22 15:31:17 +02:00
Michael Natterer d0f6846ff5 app: remove premature canvas item extents caching optimization again 2010-09-22 10:33:41 +02:00
Michael Natterer de2ae87047 app: add GimpCanvasHandle which draws tool handles
Currently only a centered cross is implemented.
2010-09-21 19:22:29 +02:00
Michael Natterer 69da253e51 app: move enum GimpHandleType to display-enums.h 2010-09-20 19:26:34 +02:00
Michael Natterer 0c1073460c app: get rid of some public draw tool API
and use gimp_draw_tool_draw_handle() instead which does exactly the
same for these cases.
2010-09-20 00:13:32 +02:00
Michael Natterer 5e5cacfd4c app: fix canvas line extents 2010-09-19 23:50:35 +02:00
Michael Natterer 46836d950d app: add a canvas line class 2010-09-19 23:46:52 +02:00
Michael Natterer f17cc0093d app: minor cleanup and fixes 2010-09-19 23:46:06 +02:00
Michael Natterer 96bdf1fec5 app: refactor the canvas items to return a GdkRegion as extents
instead of invalidating the canvas themselves.
2010-09-19 23:20:36 +02:00
Michael Natterer 69a898cc9f app: some cairo tool drawing infrastructure for review, please have a look 2010-09-19 19:45:51 +02:00
Michael Natterer 11aecbd090 app: add styles for tool drawing (still unused) 2010-09-19 19:19:24 +02:00
Michael Natterer f04e16016f app: draw inactive paths blue on white 2010-09-19 19:14:42 +02:00
Michael Natterer 7e28f52dd7 app: remove unused clipping functions in GimpDrawTool and GimpCanvas 2010-09-19 18:58:23 +02:00
Michael Natterer 428e9b908b app: more cleanup, move more variables to local scopes 2010-09-17 23:15:16 +02:00
Michael Natterer 8a029f3e4e app: enable double buffering when editing vectors 2010-09-17 23:12:42 +02:00
Michael Natterer cca9257018 app: add functions to set the vectors' cairo style
so all style constants are in one place. Also draw the active path in
red on white instead of black on white.
2010-09-17 22:50:20 +02:00
Michael Natterer 8e33205b65 app: draw all vectors strokes with one cairo_stroke() 2010-09-17 22:30:43 +02:00
Simon Budig 4e3775b7c5 app: another rounding fix, style cleanups. 2010-09-17 22:27:28 +02:00
Simon Budig 610b6a23e2 app: properly round the bounding box in the move tool 2010-09-17 21:59:51 +02:00
Sven Neumann ae0cf760ab app: only expose the area covered by the vectors object
gimp_display_shell_expose_vectors() exposes the bounding box of
the vectors plus a small border.
2010-09-17 21:32:38 +02:00
Sven Neumann ec2be9b415 app: cache bounding box of GimpVectors object
Cache the bounding box of the GimpVectors similar to the bezier
representation.
2010-09-17 21:31:55 +02:00
Sven Neumann 8cfb8c2143 app: update vectors from the freeze handler as well
This is needed so that the area covered by the vectors before the
change is exposed. Ideally of course the update signal should
include the changed area.
2010-09-17 21:28:30 +02:00
Michael Natterer 97912b481e app: move variables to local scopes in gimp_vectors_bounds() 2010-09-17 16:09:30 +02:00
Michael Natterer 6bce0641d4 app: add signal GimpImage::update_vectors() and have the image manage updates
...just as we do for drawables. Connect to adding, removing, modifying
and toggling visibility of all vectors and emit "update-vectors"
accordingly. Add an update-vectors signal handler to GimpDisplayShell
and remove all other vectors handlers.
2010-09-17 11:31:57 +02:00
Sven Neumann 372e7316b7 app: adjust line style for cairo-drawn vectors 2010-09-17 00:12:38 +02:00
Sven Neumann 31fb4c9559 app: use GSlice for GimpBezierDesc 2010-09-16 23:27:25 +02:00
Sven Neumann 72b25fd355 app: let the vectors tool draw vectors the old way again
Seems like the best solution until tool drawing is ported to cairo.
2010-09-16 23:09:14 +02:00
Sven Neumann a9a20e8c61 app: cleanup of vectors rendering
Respect the visible property of the active vectors object.
2010-09-16 21:51:23 +02:00
Sven Neumann 5abae32923 app: cache bezier representation in GimpVectors object
Introduce gimp_vectors_get_bezier() which creates the bezier
representation on demand and then caches it for subsequent calls
until the vectors object is frozen.

At some point we should introduce GimpVectors::changed instead
of relying on the fact that a vectors object is always frozen
and thawn whenever it is changed...
2010-09-16 21:36:51 +02:00
Sven Neumann 5ab83e72ac app: don't let the vectors tool draw the active vectors
Let the display shell deal with drawing the vectors. The vectors
tool only draws the handles on the active vectors object.
2010-09-16 21:13:08 +02:00
Sven Neumann 4c57e3f19e app: port GimpVectors drawing to cairo
This is just a rough proof of concept. More changes are about
to follow.
2010-09-16 21:13:08 +02:00
Sven Neumann 81182d93f7 app: use gimp_label_set_attributes() instead of markup
Use our convenient label utility function for styling. Also correct
box packing (passing FALSE, TRUE to gtk_box_pack_start() is pointless).
2010-09-16 21:12:07 +02:00
Michael Natterer aa55a98249 pdb: #include "gimpgrouplayer.h" in layers-cmds.c 2010-09-16 20:36:14 +02:00
Michael Natterer 54001221d7 pdb: deprecate gimp_layer_scale_full() and gimp_image_scale_full()
Make gimp_layer_scale() and gimp_image_scale() honor GimpPDBContext's
interpolation property and update the documentation accordingly.
2010-09-16 20:33:56 +02:00
Michael Natterer 46e4fa93b2 app: take the default value of GimpPDBContext::interpolation from gimprc 2010-09-16 20:17:55 +02:00
Martin Nordholts ec7fc273d8 Bug 629436 - the current tool is not shown in the tool options dialog 2010-09-16 17:46:10 +02:00
Michael Natterer d64bf1ee14 pdb: deprecate the entire drawable transform API 2010-09-16 00:50:28 +02:00
Michael Natterer 4d3b52ec6c pdb: return the resulting floating selection in the item transform API
This was actually documented to be the return value of all transform
procedures since 1.2, but it was always broken and returned the
passed-in drawable. Therefore it's only fixed for the new item API,
the old procedures keep their semantics (and will all be deprecated
anyway).
2010-09-16 00:36:03 +02:00
Michael Natterer bbc44c9a6b pdb: remove obsolete includes 2010-09-15 22:02:53 +02:00
Michael Natterer 38b9b4117e pdb: deprecate gimp-drawable-is-text-layer and add gimp-item-is-text-layer 2010-09-15 21:51:53 +02:00
Michael Natterer c56f0568c5 pdb: remove deprecated drawable procedures
and do the same stuff as for vectors procedures below.
2010-09-15 21:43:03 +02:00
Michael Natterer ddd3464706 pdb: forgot a few in the last commit 2010-09-15 21:26:31 +02:00
Michael Natterer ec36151277 pdb: don't have compat aliases for procedures which are deprecated themselves
Replace them by aliases for the new procedures instead.
2010-09-15 21:22:53 +02:00