[gimp/soc-2013-combined-selection-tool: 197/230] app:added function for single row selection tool
- From: Ajay Ramanathan <ajayr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2013-combined-selection-tool: 197/230] app:added function for single row selection tool
- Date: Sat, 21 Sep 2013 03:17:32 +0000 (UTC)
commit 294da02527b56f897f1fd373b52a184fff47324b
Author: Ajay Ramanathan <ajay 010293 gmail com>
Date: Fri Jul 5 19:28:17 2013 +0530
app:added function for single row selection tool
app/tools/gimpselectbyshapetool.c | 53 ++++++++++++++++++++++++++++++++++--
1 files changed, 50 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimpselectbyshapetool.c b/app/tools/gimpselectbyshapetool.c
index bd43d45..20bca20 100644
--- a/app/tools/gimpselectbyshapetool.c
+++ b/app/tools/gimpselectbyshapetool.c
@@ -169,14 +169,61 @@ gimp_select_by_shape_tool_select (GimpRectangleSelectTool *rect_tool,
TRUE);
break;
}
- default :
- gimp_channel_select_rectangle (channel,
- x, y, w, h,
+
+ case GIMP_SHAPE_SINGLE_ROW :
+ {
+ gdouble w1 = gimp_image_width (channel);
+ gdouble h1 = gimp_image_height (channel);
+ switch(sel_options->line_orientation)
+ {
+ case GIMP_ORIENTATION_HORIZONTAL :
+ gimp_channel_select_rectangle (channel,
+ 0, 0, w1, h1,
+ operation,
+ options->feather,
+ options->feather_radius,
+ options->feather_radius,
+ TRUE);
+ break;
+
+ case GIMP_ORIENTATION_VERTICAL :
+ gimp_channel_select_ellipse (channel,
+ 0, 0, w1, h1,
+ operation,
+ options->antialias,
+ options->feather,
+ options->feather_radius,
+ options->feather_radius,
+ TRUE);
+ break;
+
+ case GIMP_ORIENTATION_UNKNOWN :
+ gimp_channel_select_ellipse (channel,
+ 0, 0, w1, h1,
operation,
+ options->antialias,
options->feather,
options->feather_radius,
options->feather_radius,
TRUE);
+ break;
+ }
+
break;
+ }
+
+ case GIMP_SHAPE_N_POLYGON :
+ {
+ gimp_channel_select_ellipse (channel,
+ x, y, w, h,
+ operation,
+ options->antialias,
+ options->feather,
+ options->feather_radius,
+ options->feather_radius,
+ TRUE);
+ break;
+ }
+
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]