Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GIMP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2,644
Issues
2,644
List
Boards
Labels
Service Desk
Milestones
Merge Requests
36
Merge Requests
36
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
GIMP
Commits
33ab9451
Commit
33ab9451
authored
Oct 01, 2010
by
Michael Natterer
😴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: add gimp_draw_tool_add_stroke_group() and add_fill_group()
and use it in all tools which have groups.
parent
201bfe3e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
29 deletions
+41
-29
app/tools/gimpdrawtool.c
app/tools/gimpdrawtool.c
+32
-0
app/tools/gimpdrawtool.h
app/tools/gimpdrawtool.h
+3
-0
app/tools/gimpfreeselecttool.c
app/tools/gimpfreeselecttool.c
+1
-5
app/tools/gimpmeasuretool.c
app/tools/gimpmeasuretool.c
+1
-5
app/tools/gimpperspectiveclonetool.c
app/tools/gimpperspectiveclonetool.c
+1
-5
app/tools/gimprectangletool.c
app/tools/gimprectangletool.c
+1
-5
app/tools/gimptexttool.c
app/tools/gimptexttool.c
+1
-4
app/tools/gimptransformtool.c
app/tools/gimptransformtool.c
+1
-5
No files found.
app/tools/gimpdrawtool.c
View file @
33ab9451
...
...
@@ -362,6 +362,38 @@ gimp_draw_tool_remove_item (GimpDrawTool *draw_tool,
gimp_canvas_group_remove_item
(
GIMP_CANVAS_GROUP
(
draw_tool
->
item
),
item
);
}
GimpCanvasItem
*
gimp_draw_tool_add_stroke_group
(
GimpDrawTool
*
draw_tool
)
{
GimpCanvasItem
*
item
;
g_return_val_if_fail
(
GIMP_IS_DRAW_TOOL
(
draw_tool
),
NULL
);
item
=
gimp_canvas_group_new
(
gimp_display_get_shell
(
draw_tool
->
display
));
gimp_canvas_group_set_group_stroking
(
GIMP_CANVAS_GROUP
(
item
),
TRUE
);
gimp_draw_tool_add_item
(
draw_tool
,
item
);
g_object_unref
(
item
);
return
item
;
}
GimpCanvasItem
*
gimp_draw_tool_add_fill_group
(
GimpDrawTool
*
draw_tool
)
{
GimpCanvasItem
*
item
;
g_return_val_if_fail
(
GIMP_IS_DRAW_TOOL
(
draw_tool
),
NULL
);
item
=
gimp_canvas_group_new
(
gimp_display_get_shell
(
draw_tool
->
display
));
gimp_canvas_group_set_group_filling
(
GIMP_CANVAS_GROUP
(
item
),
TRUE
);
gimp_draw_tool_add_item
(
draw_tool
,
item
);
g_object_unref
(
item
);
return
item
;
}
/**
* gimp_draw_tool_add_line:
* @draw_tool: the #GimpDrawTool
...
...
app/tools/gimpdrawtool.h
View file @
33ab9451
...
...
@@ -84,6 +84,9 @@ void gimp_draw_tool_add_item (GimpDrawTool *draw_too
void
gimp_draw_tool_remove_item
(
GimpDrawTool
*
draw_tool
,
GimpCanvasItem
*
item
);
GimpCanvasItem
*
gimp_draw_tool_add_stroke_group
(
GimpDrawTool
*
draw_tool
);
GimpCanvasItem
*
gimp_draw_tool_add_fill_group
(
GimpDrawTool
*
draw_tool
);
GimpCanvasItem
*
gimp_draw_tool_add_line
(
GimpDrawTool
*
draw_tool
,
gdouble
x1
,
gdouble
y1
,
...
...
app/tools/gimpfreeselecttool.c
View file @
33ab9451
...
...
@@ -1545,11 +1545,7 @@ gimp_free_select_tool_draw (GimpDrawTool *draw_tool)
NO_CLICK_TIME_AVAILABLE
,
&
coords
);
stroke_group
=
gimp_canvas_group_new
(
gimp_display_get_shell
(
draw_tool
->
display
));
gimp_canvas_group_set_group_stroking
(
GIMP_CANVAS_GROUP
(
stroke_group
),
TRUE
);
gimp_draw_tool_add_item
(
draw_tool
,
stroke_group
);
g_object_unref
(
stroke_group
);
stroke_group
=
gimp_draw_tool_add_stroke_group
(
draw_tool
);
item
=
gimp_draw_tool_add_lines
(
draw_tool
,
priv
->
points
,
priv
->
n_points
,
...
...
app/tools/gimpmeasuretool.c
View file @
33ab9451
...
...
@@ -660,11 +660,7 @@ gimp_measure_tool_draw (GimpDrawTool *draw_tool)
gint
i
;
gint
draw_arc
=
0
;
stroke_group
=
gimp_canvas_group_new
(
gimp_display_get_shell
(
draw_tool
->
display
));
gimp_canvas_group_set_group_stroking
(
GIMP_CANVAS_GROUP
(
stroke_group
),
TRUE
);
gimp_draw_tool_add_item
(
draw_tool
,
stroke_group
);
g_object_unref
(
stroke_group
);
stroke_group
=
gimp_draw_tool_add_stroke_group
(
draw_tool
);
for
(
i
=
0
;
i
<
measure
->
num_points
;
i
++
)
{
...
...
app/tools/gimpperspectiveclonetool.c
View file @
33ab9451
...
...
@@ -750,11 +750,7 @@ gimp_perspective_clone_tool_draw (GimpDrawTool *draw_tool)
GimpCanvasItem
*
stroke_group
;
GimpCanvasItem
*
item
;
stroke_group
=
gimp_canvas_group_new
(
gimp_display_get_shell
(
draw_tool
->
display
));
gimp_canvas_group_set_group_stroking
(
GIMP_CANVAS_GROUP
(
stroke_group
),
TRUE
);
gimp_draw_tool_add_item
(
draw_tool
,
stroke_group
);
g_object_unref
(
stroke_group
);
stroke_group
=
gimp_draw_tool_add_stroke_group
(
draw_tool
);
/* draw the bounding box */
item
=
gimp_draw_tool_add_line
(
draw_tool
,
...
...
app/tools/gimprectangletool.c
View file @
33ab9451
...
...
@@ -1738,11 +1738,7 @@ gimp_rectangle_tool_draw (GimpDrawTool *draw_tool)
if
(
private
->
function
==
GIMP_RECTANGLE_TOOL_INACTIVE
)
return
;
stroke_group
=
gimp_canvas_group_new
(
gimp_display_get_shell
(
draw_tool
->
display
));
gimp_canvas_group_set_group_stroking
(
GIMP_CANVAS_GROUP
(
stroke_group
),
TRUE
);
gimp_draw_tool_add_item
(
draw_tool
,
stroke_group
);
g_object_unref
(
stroke_group
);
stroke_group
=
gimp_draw_tool_add_stroke_group
(
draw_tool
);
gimp_rectangle_tool_draw_guides
(
draw_tool
,
GIMP_CANVAS_GROUP
(
stroke_group
));
...
...
app/tools/gimptexttool.c
View file @
33ab9451
...
...
@@ -833,10 +833,7 @@ gimp_text_tool_draw_selection (GimpDrawTool *draw_tool)
gint
min
,
max
;
gint
i
;
fill_group
=
gimp_canvas_group_new
(
gimp_display_get_shell
(
draw_tool
->
display
));
gimp_canvas_group_set_group_filling
(
GIMP_CANVAS_GROUP
(
fill_group
),
TRUE
);
gimp_draw_tool_add_item
(
draw_tool
,
fill_group
);
g_object_unref
(
fill_group
);
fill_group
=
gimp_draw_tool_add_fill_group
(
draw_tool
);
gtk_text_buffer_get_selection_bounds
(
buffer
,
&
sel_start
,
&
sel_end
);
...
...
app/tools/gimptransformtool.c
View file @
33ab9451
...
...
@@ -785,11 +785,7 @@ gimp_transform_tool_draw (GimpDrawTool *draw_tool)
GimpCanvasItem
*
item
;
gdouble
z1
,
z2
,
z3
,
z4
;
stroke_group
=
gimp_canvas_group_new
(
gimp_display_get_shell
(
draw_tool
->
display
));
gimp_canvas_group_set_group_stroking
(
GIMP_CANVAS_GROUP
(
stroke_group
),
TRUE
);
gimp_draw_tool_add_item
(
draw_tool
,
stroke_group
);
g_object_unref
(
stroke_group
);
stroke_group
=
gimp_draw_tool_add_stroke_group
(
draw_tool
);
if
(
tr_tool
->
use_grid
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment