[gimp-gap] replaced deprecated procedure calls
- From: Wolfgang Hofer <wolfgangh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-gap] replaced deprecated procedure calls
- Date: Sat, 28 May 2016 14:29:44 +0000 (UTC)
commit c0596b102139203cbc001170c470fe53024bc52f
Author: Wolfgang Hofer <wolfgangh svn gnome org>
Date: Sat May 28 16:27:06 2016 +0200
replaced deprecated procedure calls
ChangeLog | 11 +++++++++++
gap/gap_image.c | 8 +++++++-
gap/gap_story_att_trans_dlg.c | 18 ++++++++++--------
gap/gap_story_render_processor.c | 11 +++++++----
4 files changed, 35 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0e197a5..02ade28 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-05-28 Wolfgang Hofer <hof gimp org>
+
+- replaced deprecated procedure calls:
+ gimp_image_scale_full
+ gimp_rect_select (calling gimp_image_select_rectangle instead)
+
+
+ * gap/gap_image.c
+ * gap/gap_story_att_trans_dlg.c
+ * gap/gap_story_render_processor.c
+
2016-03-28 Wolfgang Hofer <hof gimp org>
- added the changes on file gap/gap_detail_align_exec.c
diff --git a/gap/gap_image.c b/gap/gap_image.c
index 5a0b448..a9b355e 100644
--- a/gap/gap_image.c
+++ b/gap/gap_image.c
@@ -65,8 +65,14 @@ gap_image_delete_immediate (gint32 image_id)
}
gimp_image_undo_disable(image_id);
+
+ //gimp_image_scale_full(image_id, 2, 2, 0 /*INTERPOLATION_NONE*/);
+
+ gimp_context_push();
+ gimp_context_set_interpolation(0);
+ gimp_image_scale(image_id, 2, 2);
+ gimp_context_pop();
- gimp_image_scale_full(image_id, 2, 2, 0 /*INTERPOLATION_NONE*/);
gimp_image_undo_enable(image_id); /* clear undo stack */
}
diff --git a/gap/gap_story_att_trans_dlg.c b/gap/gap_story_att_trans_dlg.c
index d30c8d4..4bbfe10 100644
--- a/gap/gap_story_att_trans_dlg.c
+++ b/gap/gap_story_att_trans_dlg.c
@@ -1346,6 +1346,10 @@ p_create_color_layer(GapStbAttrWidget *attw, gint32 image_id
ofs_x = ((gdouble)gimp_image_width(image_id) - pv_master_width) / 2.0;
ofs_y = ((gdouble)gimp_image_height(image_id) - pv_master_height) / 2.0;
+ gimp_context_push();
+ gimp_context_set_feather(FALSE);
+ gimp_context_set_feather_radius(0.0, 0.0);
+
/* green border */
{
GimpRGB color;
@@ -1356,15 +1360,14 @@ p_create_color_layer(GapStbAttrWidget *attw, gint32 image_id
color.b = 0.17;
color.a = 1.0;
+
/* selection for green rectangle (2 pixels border around master size) */
- gimp_rect_select(image_id
+ gimp_image_select_rectangle(image_id
+ , GIMP_CHANNEL_OP_REPLACE
, ofs_x -2
, ofs_y -2
, pv_master_width +4
, pv_master_height +4
- , GIMP_CHANNEL_OP_REPLACE
- , 0 /* gint32 feather */
- , 0.0 /* gdouble feather radius */
);
gimp_context_get_background(&bck_color);
@@ -1377,19 +1380,18 @@ p_create_color_layer(GapStbAttrWidget *attw, gint32 image_id
gimp_context_set_background(&bck_color);
}
- gimp_rect_select(image_id
+ gimp_image_select_rectangle(image_id
+ , GIMP_CHANNEL_OP_REPLACE
, ofs_x
, ofs_y
, pv_master_width
, pv_master_height
- , GIMP_CHANNEL_OP_REPLACE
- , 0 /* gint32 feather */
- , 0.0 /* gdouble feather radius */
);
gimp_edit_clear(layer_id);
gimp_selection_none(image_id);
+ gimp_context_pop();
return (layer_id);
} /* end p_create_color_layer */
diff --git a/gap/gap_story_render_processor.c b/gap/gap_story_render_processor.c
index 858977f..d420ca4 100644
--- a/gap/gap_story_render_processor.c
+++ b/gap/gap_story_render_processor.c
@@ -5625,13 +5625,16 @@ p_transform_and_add_layer( gint32 comp_image_id
);
}
- gimp_rect_select(l_tmp_image_id
+ gimp_context_push();
+ gimp_context_set_feather(FALSE);
+ gimp_context_set_feather_radius(0.0, 0.0);
+
+ gimp_image_select_rectangle(l_tmp_image_id
+ , GIMP_CHANNEL_OP_REPLACE
, sx, sy
, swidth, sheight
- , GIMP_CHANNEL_OP_REPLACE
- , FALSE /* feather flag */
- , 0.0 /* feather_radius */
);
+ gimp_context_pop();
}
gimp_edit_copy(layer_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]