[gimp] app: avoid to rotate unattached vectors directory in ...
- From: ONO Yoshio <onoyoshio src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: avoid to rotate unattached vectors directory in ...
- Date: Wed, 12 Sep 2018 11:54:53 +0000 (UTC)
commit 5483ea88e50e97a6a4b8598c513784881c2bb58b
Author: ONO Yoshio <ohtsuka yoshio gmail com>
Date: Thu Sep 6 08:37:58 2018 +0900
app: avoid to rotate unattached vectors directory in ...
... gimp_text_tool_create_vectors_warped().
fixed commit 8dfe00fa1781f25bd16b8c04d5805061959dcaf4
app/tools/gimptexttool.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index 64f4a17cf3..40e5d966c6 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -52,6 +52,8 @@
#include "text/gimptextlayout.h"
#include "text/gimptextundo.h"
+#include "vectors/gimpstroke.h"
+#include "vectors/gimpvectors.h"
#include "vectors/gimpvectors-warp.h"
#include "widgets/gimpdialogfactory.h"
@@ -2299,6 +2301,7 @@ gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool)
vectors = gimp_text_vectors_new (text_tool->image, text_tool->text);
+ offset = 0;
dir = gimp_text_tool_get_direction (text_tool);
switch (dir)
{
@@ -2311,19 +2314,13 @@ gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool)
case GIMP_TEXT_DIRECTION_TTB_LTR:
case GIMP_TEXT_DIRECTION_TTB_LTR_UPRIGHT:
{
- GimpContext *context;
- context = GIMP_CONTEXT (gimp_tool_get_options (GIMP_TOOL (text_tool)));
-
- gimp_item_rotate (GIMP_ITEM (vectors),
- context,
- GIMP_ROTATE_270,
- 0,
- 0,
- FALSE);
- gimp_item_translate (GIMP_ITEM (vectors),
- 0,
- box_width,
- FALSE);
+ GimpStroke *stroke = NULL;
+
+ while ((stroke = gimp_vectors_stroke_get_next (vectors, stroke)))
+ {
+ gimp_stroke_rotate (stroke, 0, 0, 270);
+ gimp_stroke_translate (stroke, 0, box_width);
+ }
}
offset = 0.5 * box_width;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]