Commit Graph

3207 Commits

Author SHA1 Message Date
Martin Nordholts 19bf6ff497 Bug 629926 - some tool sliders are not usable
"Aspect Ratio" takes too much horizontal space, shorten to just
"Aspect".
2010-10-03 19:06:24 +02:00
Michael Natterer f3450431a3 app: add a pen canvas item class and use it in the foreground select tool
Remove gimp_display_shell_draw_pen().
2010-10-03 02:26:40 +02:00
Michael Natterer 33ab94517f app: add gimp_draw_tool_add_stroke_group() and add_fill_group()
and use it in all tools which have groups.
2010-10-01 14:24:46 +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 26d0035be0 app: draw guides using GimpCanvasItems
- Add signals GimpImage::guide_added(), removed() and moved()
- Remove singal GimpImage::update_guide()
- Adapt core code to emit the new signals instead of update_guide()
- Have the shell connect to the new signals and update guide canvas
  items as needed
- Remove gimp_display_shell_draw_guides()
2010-10-01 10:34:15 +02:00
Michael Natterer 2ced18cc87 app: add gimp_draw_tool_add_sample_point()
and use it in the color tool. Also rename
gimp_draw_tool_add_guide_line() to gimp_draw_tool_add_guide().
2010-09-30 02:03:16 +02:00
Michael Natterer f5750647c1 app: use a GimpCanvasSamplePoint to draw the hovered sample point 2010-09-30 01:32:34 +02:00
Michael Natterer 50efb96222 app: remove empty GimpTool::control() implementation 2010-09-30 00:40:42 +02:00
Michael Natterer a8259996e4 app: simplify the drawing code
by using gimp_draw_tool_add_guide_line() for the active guide too.
2010-09-30 00:39:15 +02:00
Michael Natterer d3e2db88bb app: restart the draw tool after moving a guide
so the dropped guide is highlighted. Also don't uselessly stop/start
the draw tool in each oper_update(), only do so when the display
changes.
2010-09-30 00:29:11 +02:00
Michael Natterer 89af8f4143 app: use a GimpCanvasGuide to display the hovered guide
And don't call any shell draw functions directly any longer.
2010-09-30 00:18:00 +02:00
Michael Natterer 7edfa2ca54 app: start an infrastructure where the shell keeps around its canvas items
- Invalidate the proper area when an item gets added or removed.
- Draw the kept canvas items instead of calling a draw tool function.
- The draw tool now sets its item on the shell.
2010-09-29 22:12:01 +02:00
Sven Neumann 2ef259cd20 app: use GimpRGB as mask color
Instead of passing GimpChannelType as mask color to
gimp_display_shell_set_mask(), change that function to accept a
GimpRGB color.

Adapt GimpForegroundSelectTool, the only user of the display mask
feature, to this change.
2010-09-29 20:35:00 +02:00
Michael Natterer ebeb933350 app: add gimp_display_shell_expose_item() and use it in the draw tool 2010-09-29 20:10:21 +02:00
Michael Natterer e869e83f56 app: add the text tool's selection rectangles to a filling group
Doesn't look any better but is a step in the right direction.
2010-09-27 23:04:18 +02:00
Michael Natterer 3f2641c4be app: put the bounding box lines into a stroking group 2010-09-27 19:32:25 +02:00
Michael Natterer 06da10bc08 app: change boundary drawing by tools to work like the selection
- GimpCanvasBoundary takes unsorted BoundSeg arrays now and uses
  gimp_display_shell_transform_boundary() and gimp_cairo_add_boundary().
- Nobody calls boundary_sort() any longer for the purpose of displaying
  a boundary.
- gimp_display_shell_transform_boundary() got offset parameters
  so it can transform things that are not in the image's coordinate
  system.
2010-09-26 22:41:04 +02:00
Michael Natterer 4492725110 app: add some (disabled) code that draws the untransformed brush outline 2010-09-26 22:27:55 +02:00
Michael Natterer ffd57307c8 app: put the transform tool's grid and boundary into a stroke group 2010-09-26 18:44:40 +02:00
Michael Natterer 6ec1729035 app: add the handle that is being dragged to the stroke group too 2010-09-26 17:13:53 +02:00
Michael Natterer 9cce1b894b app: put a lot of rectangle tool lines into a stroke groups
so they don't overlap.
2010-09-26 16:17:05 +02:00
Michael Natterer e0f35d8979 app: put the lines and the angle arc into a stroke group
This looks much better, and makes the lines appear under the handles
as a nice side effect.
2010-09-26 15:49:10 +02:00
Michael Natterer a306a46d45 app: make the code that puts the lines into a stroke group nicer
This much lesss feels like we need new API, let's see...
2010-09-26 15:43:59 +02:00
Michael Natterer 4b89850a2e app: draw the free select tool's line in one stroke()
This is clearly too complicated for general use, but it's only a test
case for the new APIs.
2010-09-26 14:17:04 +02:00
Michael Natterer b173707c84 app: add gimp_draw_tool_remove_item() 2010-09-26 14:15:47 +02:00
Michael Natterer 970a062b01 app: argh! never add even only one line of code without testing... 2010-09-26 00:30:09 +02:00
Michael Natterer b3af235e79 app: rename all gimp_draw_tool_draw_foo() functions
to gimp_draw_tool_add_foo() because that's what they do now.
2010-09-25 19:02:22 +02:00
Michael Natterer 5089b9a706 app: remove gimp_draw_tool_in_radius()
It was used only once and that code is not less readable when using
gimp_draw_tool_calc_distance_square().
2010-09-25 18:24:38 +02:00
Michael Natterer dfd5a265eb app: remove gimp_draw_tool_draw_dashed_line()
Instead, draw a normal line and set the "highlight" property on the
returned canvas item.
2010-09-25 18:04:40 +02:00
Michael Natterer e91dce5f9f app: remove gimp_draw_tool_draw_arc_by_anchor()
Instead, draw a circular handle and set the angles on the returned
canvas item.
2010-09-25 17:59:56 +02:00
Michael Natterer 5cda4393d0 app: return the created item from gimp_draw_tool_draw_foo() 2010-09-25 17:52:56 +02:00
Michael Natterer 02924e1e70 app: change the unit of angles in the draw tool's draw_arc() functions
from the weird X 1/64 of a degree to radian.
2010-09-25 17:35:40 +02:00
Michael Natterer df44ced093 app: keep the draw tool's items around in a GimpCanvasGroup
which reduces the number of invalidations on the canvas to one.
2010-09-25 17:20:08 +02:00
Michael Natterer 62f8f559a7 app: add gimp_draw_tool_add_item() and use it all over the place 2010-09-25 11:19:00 +02:00
Michael Natterer cbaf997ae2 app: undraw the old canvas items only before drawing new ones
or when the draw tool is really stopped. This seems to get rid of any
remaining flickering and also reduces expose events. Also get rid of
the "is_drawn" state and API because they make no sense any longer.
2010-09-24 23:25:19 +02:00
Michael Natterer 5d14e9befc app: move clearing and invalidating canvas items to utility functions 2010-09-24 21:25:01 +02:00
Michael Natterer 7a6a57c42f app: remove code in draw() that special cases drawing vs. undrawing
GimpDrawTool::draw() is not used for undrawing any longer.
2010-09-24 21:18:45 +02:00
Michael Natterer 313f8bee1e app: remove "gboolean use_cairo" from the draw tool again
It's always TRUE now.
2010-09-24 21:14:49 +02:00
Michael Natterer 21adcb22e1 app: port the region select tool to gimp_draw_tool_draw_boundary()
instead of drawing cached segments directly. This is a massive
performance regression, will have to optinmize boundary drawing
some other way.
2010-09-24 20:58:22 +02:00
Michael Natterer a5c961ae6f app: remove the last traces of gimp_canvas_draw_foo() from the draw tool 2010-09-24 20:40:02 +02:00
Michael Natterer 9154814b94 app: enable cairo drawing for the text tool
This looks absolutely unacceptable if there is a selection, will
fix that later with a special text selection item or a special
style.
2010-09-24 20:35:59 +02:00
Michael Natterer 957acb42e8 app: add support for cairo text cursor drawing 2010-09-24 20:35:14 +02:00
Michael Natterer e7f1d444c3 app: remove much more dead code paths from the draw tool and the canvas 2010-09-24 19:08:19 +02:00
Michael Natterer 9cb4a2e87b app: enable cairo drawing for the align tool 2010-09-24 18:59:05 +02:00
Michael Natterer 926bbc6658 app: enable cairo drawing for the rect and ellipse select tools
and draw the rectangle's round corners under the bounding box.
2010-09-24 18:43:09 +02:00
Michael Natterer 67708a65a1 app: add support for cairo arcs 2010-09-24 18:42:36 +02:00
Michael Natterer db1da1ed64 app: handle sizes should be odd numbers 2010-09-24 13:13:53 +02:00
Michael Natterer 398742b3ac app: draw the grid under the bounding box 2010-09-24 13:13:33 +02:00
Michael Natterer b5194b65c5 app: handle sizes should be odd numbers 2010-09-24 13:13:02 +02:00
Michael Natterer 75c11e259d app: fix off-by-one in rectangle tool guides
and draw the guides below the rectangle.
2010-09-24 11:21:07 +02:00