Commit Graph

104 Commits

Author SHA1 Message Date
Ell 6023f97509 app: use a pickable instead of a drawable in GimpCanvasTransformPreview
In GimpCanvasTransformPreview, use a GimpPickable, instead of a
GimpDrawable, as the preview source, so that we can use it with the
image projection, rather than just with drawables.
2019-08-11 00:28:43 +03:00
ONO Yoshio 587d9bbb03 MR !19: Add support for vertical text writing.
Squashed commit of the following:

commit ee1ff7d502658cfa1248a13a3f0348495db07eda
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sun Jul 29 00:31:47 2018 +0900

    Fixed that gimp-text-dir-ttb-* icons are lacked in Symbolic.

commit d87d012d697628da28fe90199cc04b95b72ba8ef
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 16:23:10 2018 +0900

    Fix a typo.

commit cf0238bf7df56c384cdf3b7ec69557d14740f853
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 15:50:57 2018 +0900

    Fixed seg fault error.

commit b07f60d06f
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Fri Jul 27 17:15:34 2018 +0900

    Add support for vertical text writing.

    https://gitlab.gnome.org/GNOME/gimp/issues/641
2018-07-30 19:14:49 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell 2e9ab59d19 app: use matrix to determine if doing perspective transform in preview
In GimpCanvasTransformPreview, use the transform matrix to
determine if we're doing a perspective transform, rather than
relying on a separate property, so that we don't use the slow
perspective path unnecessarily.

Consequently, remove the does_perspective member of
GimpTransformTool, since it's no longer used.
2017-11-14 11:24:56 -05:00
Michael Natterer 2296d08bad app: remove gimp_draw_tool_add_rectangle_guides() and _add_corner() 2017-06-28 15:47:23 +02:00
Michael Natterer 8b3be42e42 app: add gimp_draw_tool_set_default_status()
which sets a statusbar message to be used if there is no widget set,
or when hovering another display.
2017-06-26 21:47:54 +02:00
Michael Natterer 0d3f719381 app: add gimp_draw_tool_set_widget() and use it in all ported tools
which so far manages drawing of the widget's GimpCanvasItem. Remove
GimpDrawTool::draw() implementations from most of the affected tools.
2017-06-26 19:50:31 +02:00
Michael Natterer 96b8023091 app: add gimp_image_pick_vectors(), remove gimp_draw_tool_on_vectors() 2017-06-22 11:35:57 +02:00
Michael Natterer f7d4bcfe54 app: remove API that is not needed any longer from GimpDrawTool
and simplify gimp_draw_tool_on_vectors()'s API.
2017-06-22 01:31:41 +02:00
Michael Natterer 055ca325f2 app: manage the preview opacity with an object binding too 2017-06-19 23:39:37 +02:00
Michael Natterer 546bbe1e14 app: add a transform matrix to GimpCanvasPolygon and all API using it 2017-06-19 21:53:49 +02:00
Michael Natterer f5a6c859d7 app: remove gimp_draw_tool_add_transform_guides() 2017-06-19 08:08:14 +02:00
Jehan e01d56969d app: move all guide styling to gimpcanvas-style. 2016-02-03 19:38:32 +01:00
Jehan b8fadf3ad7 app: add a "custom" guide concept.
With gimp_guide_custom_new(), you can create a custom guide with a different
style on canvas (other pattern/color/width). A custom guide won't be saved
and could be used, for instance, for specific GEGL op guiding.
2016-02-02 21:15:13 +01:00
Michael Natterer c17e8b0412 app: add crosshair drawing to GimpCanvasAnchor and use it in GimpPaintTool
instead of drawing the crosshair cursor manually.
2014-11-18 23:06:43 +01:00
Michael Natterer fd4e220c28 Bug 663582 - Brush outline is too slow
Keep around the last drawing time in GimpDrawTool and make sure we
draw at least with a frame rate of around 20 fps, which feels
reasonably non-laggy.
2012-10-04 20:43:58 +02:00
Michael Natterer 2c62644f94 app: BoundSeg -> GimpBoundSeg, boundary_foo() -> gimp_boundary_foo() 2012-05-02 17:46:02 +02:00
Michael Natterer d38ded387d Bug 663121 - guides are below rotate/transform/shear/perspective preview
Add a canvas item group for previews, and a small preview infrastructure
to GimpDrawTool, and put the transform preview into the preview group,
which is below all guides, grid and layer boundaries.
2011-11-16 21:32:29 +01:00
Michael Natterer c2e6f24687 app: add GimpCanvasTransformGuides and use them in the transform tool
which removes a lot of code from the transform tool, and reduces the
number of canvas items used for the transform grid from possibly
gazillions to one.
2011-07-24 18:42:13 +02:00
Michael Natterer 4e6f43a890 app: add new item class GimpCanvasRectangleGuides and use it
Removes a lot of code from the rectangle tool and fixes off-by-one
drawing problems because in image coordinates, lines can't be aligned
correctly with rectangles.
2011-05-22 22:09:09 +02:00
Michael Natterer 99e0e73fc6 app: add "x" and "y" properties to GimpCanvasPath
so paths can be rendered at any position. Pass 0,0 from all places
that draw GimpVectors.
2011-04-04 20:58:38 +02:00
Michael Natterer 20bed2c609 app: add gimp_draw_tool_add_transform_preview() and use it 2011-03-28 02:18:00 +02:00
Michael Natterer 3f6a70f7fe app: define one more standard tool handle size 2010-11-08 22:48:50 +01:00
Michael Natterer cf0402f069 app: consistent handle sizes for tool drawing
Replace a myriad of defines in different tools by three consistent
sizes defined in gimpdrawtool.h.
2010-11-08 22:37:00 +01:00
Michael Natterer 5b64b83569 app: introduce enum GimpHandleAnchor as replacement for GtkAnchorType
because the latter is gone in GTK+ 3.0
2010-10-18 12:50:17 +02:00
Michael Natterer 11bc11d2f7 app: add back the draw timeout 2010-10-11 22:27:32 +02:00
Michael Natterer 3de4d7263a app: Bug 631619 - Drawing artifacts spread by paintbrush outline on canvas
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.
2010-10-09 22:00:19 +02:00
Michael Natterer 54a65fa9c3 app: add gimp_draw_tool_add_path() and use it in the vector tool
Also clean up gimp_vector_tool_draw() a bit.
2010-10-07 14:10:57 +02:00
Sven Neumann 8587e1e920 app/tools: introduce gimp_draw_tool_add_crosshair()
gimp_draw_tool_add_crosshair() is a convenience function that
adds two intersecting guide lines in a stroke group.
2010-10-04 22:02:12 +02:00
Michael Natterer b693269060 app: simplify creating of stroke and fill groups a lot
- add gimp_draw_tool_push_group()/pop_group() which manage a stack
  of groups; all items automatically get added to the stack's top group
- use push_group()/pop_group() all over the place, which saves a lot
  of code in most cases
- return GimpCanvasGroup not GimpCanvasItem pointers from
  gimp_draw_tool_add_stroke_group() and fill_group()

Unrelated:

- add GipmCanvasGroup parameter to gimp_rectangle_tool_draw()
- put rect select's round corners into the stroke group to
  avoid ugly overdrawing (the mis-alignment of arcs becomes
  very visible now however, will fix that soon)
2010-10-04 14:03:37 +02:00
Michael Natterer d88a348c18 app: add public API for the "guide-style" and "sample-point-style" properties
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.
2010-10-03 22:14:40 +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 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 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
Michael Natterer b173707c84 app: add gimp_draw_tool_remove_item() 2010-09-26 14:15:47 +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 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 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 4d0c750327 app: get rid of "gboolean use_offsets" in the draw tool
and always pass image coordinates. Transform the coords manually in
the very few places which passed TRUE.
2010-09-23 19:23:27 +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 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 69da253e51 app: move enum GimpHandleType to display-enums.h 2010-09-20 19:26:34 +02:00