Commit f4f8117d authored by Manish Singh's avatar Manish Singh
Browse files

Doh.. wrong version

-Yosh
parent c6009943
GIMP Dynamic Text -- image filter plug-in for The GIMP program
==============================================================
GDynText 1.4.0
GDynText 1.4.1
Copyright (C) 1998,1999 Marco Lamberto
E-mail: lm@geocities.com
Web page: http://www.geocities.com/Tokyo/1474/gimp/
......
......@@ -522,7 +522,7 @@ void gdt_set_values(GdtVals *data)
void gdt_render_text(GdtVals *data)
{
gint layer_ox, layer_oy, i, nret_vals, xoffs;
gint32 layer_f;
gint32 layer_f, selection_empty, selection_channel;
gint32 text_width, text_height;
gint32 text_ascent, text_descent;
gint32 layer_width, layer_height;
......@@ -536,6 +536,22 @@ void gdt_render_text(GdtVals *data)
PARAM_IMAGE, data->image_id, PARAM_END);
gimp_destroy_params(ret_vals, nret_vals);
/* save and remove current selection */
ret_vals = gimp_run_procedure("gimp_selection_is_empty", &nret_vals,
PARAM_IMAGE, data->image_id, PARAM_END);
selection_empty = ret_vals[1].data.d_int32;
gimp_destroy_params(ret_vals, nret_vals);
if (selection_empty == FALSE) {
/* there is an active selection to save */
ret_vals = gimp_run_procedure("gimp_selection_save", &nret_vals,
PARAM_IMAGE, data->image_id, PARAM_END);
selection_channel = ret_vals[1].data.d_int32;
gimp_destroy_params(ret_vals, nret_vals);
ret_vals = gimp_run_procedure("gimp_selection_none", &nret_vals,
PARAM_IMAGE, data->image_id, PARAM_END);
gimp_destroy_params(ret_vals, nret_vals);
}
text_style = strsplit(data->font_style, '-');
/* retrieve space char width */
......@@ -744,6 +760,17 @@ void gdt_render_text(GdtVals *data)
gimp_layer_set_preserve_transparency(data->layer_id, 1);
/* restore old selection if any */
if (selection_empty == FALSE) {
ret_vals = gimp_run_procedure("gimp_selection_load", &nret_vals,
#ifndef GIMP_HAVE_PARASITES
PARAM_IMAGE, data->image_id,
#endif
PARAM_CHANNEL, selection_channel, PARAM_END);
gimp_destroy_params(ret_vals, nret_vals);
gimp_image_remove_channel(data->image_id, selection_channel);
}
ret_vals = gimp_run_procedure("gimp_undo_push_group_end", &nret_vals,
PARAM_IMAGE, data->image_id, PARAM_END);
gimp_destroy_params(ret_vals, nret_vals);
......
......@@ -25,7 +25,7 @@
#include "libgimp/gimpintl.h"
#define GDYNTEXT_VERSION "1.4.0"
#define GDYNTEXT_VERSION "1.4.1"
#define GDYNTEXT_MAGIC "GDT09"
#define GDYNTEXT_WEB_PAGE "http://www.geocities.com/Tokyo/1474/gimp/"
#define MAX_TEXT_SIZE (64 * 1024)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment