mirror of https://github.com/GNOME/gimp.git
updated iterator procedure for paper_tile plug-in
(patch from Wolfgang Hofer) --Sven
This commit is contained in:
parent
5d7b3fa197
commit
5c1c35415e
|
@ -1,3 +1,7 @@
|
||||||
|
Wed Sep 29 13:34:26 MEST 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/gap: updated iterator procedure for paper_tile
|
||||||
|
|
||||||
Tue Sep 28 20:54:45 CDT 1999 James Mitchell <mitchell@gimp.org>
|
Tue Sep 28 20:54:45 CDT 1999 James Mitchell <mitchell@gimp.org>
|
||||||
|
|
||||||
* plug-ins/perl/po/it.po: Added from Daniele Medri <madrid@linux.it>
|
* plug-ins/perl/po/it.po: Added from Daniele Medri <madrid@linux.it>
|
||||||
|
|
|
@ -37,7 +37,6 @@ EXTRA_DIST = \
|
||||||
iter_ALT/gen/plug_in_mosaic_iter_ALT.inc \
|
iter_ALT/gen/plug_in_mosaic_iter_ALT.inc \
|
||||||
iter_ALT/gen/plug_in_newsprint_iter_ALT.inc \
|
iter_ALT/gen/plug_in_newsprint_iter_ALT.inc \
|
||||||
iter_ALT/gen/plug_in_noisify_iter_ALT.inc \
|
iter_ALT/gen/plug_in_noisify_iter_ALT.inc \
|
||||||
iter_ALT/gen/plug_in_paper_tile_iter_ALT.inc \
|
|
||||||
iter_ALT/gen/plug_in_pixelize_iter_ALT.inc \
|
iter_ALT/gen/plug_in_pixelize_iter_ALT.inc \
|
||||||
iter_ALT/gen/plug_in_randomize_hurl_iter_ALT.inc \
|
iter_ALT/gen/plug_in_randomize_hurl_iter_ALT.inc \
|
||||||
iter_ALT/gen/plug_in_randomize_pick_iter_ALT.inc \
|
iter_ALT/gen/plug_in_randomize_pick_iter_ALT.inc \
|
||||||
|
@ -70,6 +69,7 @@ EXTRA_DIST = \
|
||||||
iter_ALT/mod/plug_in_nova_iter_ALT.inc \
|
iter_ALT/mod/plug_in_nova_iter_ALT.inc \
|
||||||
iter_ALT/mod/plug_in_oilify_iter_ALT.inc \
|
iter_ALT/mod/plug_in_oilify_iter_ALT.inc \
|
||||||
iter_ALT/mod/plug_in_pagecurl_iter_ALT.inc \
|
iter_ALT/mod/plug_in_pagecurl_iter_ALT.inc \
|
||||||
|
iter_ALT/mod/plug_in_papertile_iter_ALT.inc \
|
||||||
iter_ALT/mod/plug_in_plasma_iter_ALT.inc \
|
iter_ALT/mod/plug_in_plasma_iter_ALT.inc \
|
||||||
iter_ALT/mod/plug_in_polar_coords_iter_ALT.inc \
|
iter_ALT/mod/plug_in_polar_coords_iter_ALT.inc \
|
||||||
iter_ALT/mod/plug_in_sample_colorize_iter_ALT.inc \
|
iter_ALT/mod/plug_in_sample_colorize_iter_ALT.inc \
|
||||||
|
|
|
@ -130,7 +130,8 @@ State Procedure_name Testnotes
|
||||||
+ * plug_in_nova
|
+ * plug_in_nova
|
||||||
+ * plug_in_oilify (interface changed)
|
+ * plug_in_oilify (interface changed)
|
||||||
- * plug_in_pagecurl ERROR: no stored data found for Key plug_in_pagecurl
|
- * plug_in_pagecurl ERROR: no stored data found for Key plug_in_pagecurl
|
||||||
- plug_in_paper_tile OK Button disappeared at 1.st press ?????
|
-Del plug_in_paper_tile OK Button disappeared at 1.st press ?????
|
||||||
|
+ * plug_in_papertile
|
||||||
+ plug_in_pixelize
|
+ plug_in_pixelize
|
||||||
+ * plug_in_plasma
|
+ * plug_in_plasma
|
||||||
+ * plug_in_polar_coords (interface changed)
|
+ * plug_in_polar_coords (interface changed)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
* This Module contains:
|
* This Module contains:
|
||||||
* - Implementation of XXX_Iterator_ALT Procedures
|
* - Implementation of XXX_Iterator_ALT Procedures
|
||||||
* for those Plugins of the gimp.0.99.17 release
|
* for those Plugins of the gimp.1.1.9 release
|
||||||
* - that can operate on a single drawable,
|
* - that can operate on a single drawable,
|
||||||
* - and have paramters for varying.
|
* - and have paramters for varying.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
* without name conflicts.
|
* without name conflicts.
|
||||||
*
|
*
|
||||||
* The 2.nd section of this file was generated by gap_filter_codegen.c:p_gen_code_iter_ALT
|
* The 2.nd section of this file was generated by gap_filter_codegen.c:p_gen_code_iter_ALT
|
||||||
* using the PDB at version gimp 0.99.18 as base.
|
* using the PDB at version gimp 1.1.9 as base.
|
||||||
* Unforunately, some of the plugins are using datastructures
|
* Unforunately, some of the plugins are using datastructures
|
||||||
* to store their "Last Values"
|
* to store their "Last Values"
|
||||||
* that are differnt from its calling parameters (as described in the PDB)
|
* that are differnt from its calling parameters (as described in the PDB)
|
||||||
|
@ -395,6 +395,7 @@ static void p_delta_LightSettings(t_LightSettings *val, t_LightSettings *val_fro
|
||||||
#include "iter_ALT/mod/plug_in_nova_iter_ALT.inc"
|
#include "iter_ALT/mod/plug_in_nova_iter_ALT.inc"
|
||||||
#include "iter_ALT/mod/plug_in_oilify_iter_ALT.inc"
|
#include "iter_ALT/mod/plug_in_oilify_iter_ALT.inc"
|
||||||
#include "iter_ALT/mod/plug_in_pagecurl_iter_ALT.inc"
|
#include "iter_ALT/mod/plug_in_pagecurl_iter_ALT.inc"
|
||||||
|
#include "iter_ALT/mod/plug_in_papertile_iter_ALT.inc"
|
||||||
#include "iter_ALT/mod/plug_in_plasma_iter_ALT.inc"
|
#include "iter_ALT/mod/plug_in_plasma_iter_ALT.inc"
|
||||||
#include "iter_ALT/mod/plug_in_polar_coords_iter_ALT.inc"
|
#include "iter_ALT/mod/plug_in_polar_coords_iter_ALT.inc"
|
||||||
#include "iter_ALT/mod/plug_in_sample_colorize_iter_ALT.inc"
|
#include "iter_ALT/mod/plug_in_sample_colorize_iter_ALT.inc"
|
||||||
|
@ -446,7 +447,6 @@ static void p_delta_LightSettings(t_LightSettings *val, t_LightSettings *val_fro
|
||||||
#include "iter_ALT/gen/plug_in_mosaic_iter_ALT.inc"
|
#include "iter_ALT/gen/plug_in_mosaic_iter_ALT.inc"
|
||||||
#include "iter_ALT/gen/plug_in_newsprint_iter_ALT.inc"
|
#include "iter_ALT/gen/plug_in_newsprint_iter_ALT.inc"
|
||||||
#include "iter_ALT/gen/plug_in_noisify_iter_ALT.inc"
|
#include "iter_ALT/gen/plug_in_noisify_iter_ALT.inc"
|
||||||
#include "iter_ALT/gen/plug_in_paper_tile_iter_ALT.inc"
|
|
||||||
#include "iter_ALT/gen/plug_in_pixelize_iter_ALT.inc"
|
#include "iter_ALT/gen/plug_in_pixelize_iter_ALT.inc"
|
||||||
#include "iter_ALT/gen/plug_in_randomize_hurl_iter_ALT.inc"
|
#include "iter_ALT/gen/plug_in_randomize_hurl_iter_ALT.inc"
|
||||||
#include "iter_ALT/gen/plug_in_randomize_pick_iter_ALT.inc"
|
#include "iter_ALT/gen/plug_in_randomize_pick_iter_ALT.inc"
|
||||||
|
@ -568,7 +568,7 @@ static t_iter_ALT_tab g_iter_ALT_tab[] =
|
||||||
, { "plug_in_nova", p_plug_in_nova_iter_ALT }
|
, { "plug_in_nova", p_plug_in_nova_iter_ALT }
|
||||||
, { "plug_in_oilify", p_plug_in_oilify_iter_ALT }
|
, { "plug_in_oilify", p_plug_in_oilify_iter_ALT }
|
||||||
, { "plug_in_pagecurl", p_plug_in_pagecurl_iter_ALT }
|
, { "plug_in_pagecurl", p_plug_in_pagecurl_iter_ALT }
|
||||||
, { "plug_in_paper_tile", p_plug_in_paper_tile_iter_ALT }
|
, { "plug_in_papertile", p_plug_in_papertile_iter_ALT }
|
||||||
, { "plug_in_pixelize", p_plug_in_pixelize_iter_ALT }
|
, { "plug_in_pixelize", p_plug_in_pixelize_iter_ALT }
|
||||||
, { "plug_in_plasma", p_plug_in_plasma_iter_ALT }
|
, { "plug_in_plasma", p_plug_in_plasma_iter_ALT }
|
||||||
, { "plug_in_polar_coords", p_plug_in_polar_coords_iter_ALT }
|
, { "plug_in_polar_coords", p_plug_in_polar_coords_iter_ALT }
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
/* ----------------------------------------------------------------------
|
|
||||||
* p_plug_in_paper_tile_iter_ALT
|
|
||||||
* ----------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
gint p_plug_in_paper_tile_iter_ALT(GRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct)
|
|
||||||
{
|
|
||||||
typedef struct t_plug_in_paper_tile_Vals
|
|
||||||
{
|
|
||||||
long width;
|
|
||||||
long height;
|
|
||||||
long slide_length;
|
|
||||||
long bg_type;
|
|
||||||
} t_plug_in_paper_tile_Vals;
|
|
||||||
|
|
||||||
t_plug_in_paper_tile_Vals buf, *buf_from, *buf_to;
|
|
||||||
|
|
||||||
if(len_struct != sizeof(t_plug_in_paper_tile_Vals))
|
|
||||||
{
|
|
||||||
fprintf(stderr, "ERROR: p_plug_in_paper_tile_iter_ALT stored Data missmatch in size %d != %d\n",
|
|
||||||
(int)len_struct, sizeof(t_plug_in_paper_tile_Vals) );
|
|
||||||
return -1; /* ERROR */
|
|
||||||
}
|
|
||||||
|
|
||||||
gimp_get_data("plug_in_paper_tile_ITER_FROM", g_plugin_data_from);
|
|
||||||
gimp_get_data("plug_in_paper_tile_ITER_TO", g_plugin_data_to);
|
|
||||||
|
|
||||||
buf_from = (t_plug_in_paper_tile_Vals *)&g_plugin_data_from[0];
|
|
||||||
buf_to = (t_plug_in_paper_tile_Vals *)&g_plugin_data_to[0];
|
|
||||||
memcpy(&buf, buf_from, sizeof(buf));
|
|
||||||
|
|
||||||
p_delta_long(&buf.width, buf_from->width, buf_to->width, total_steps, current_step);
|
|
||||||
p_delta_long(&buf.height, buf_from->height, buf_to->height, total_steps, current_step);
|
|
||||||
p_delta_long(&buf.slide_length, buf_from->slide_length, buf_to->slide_length, total_steps, current_step);
|
|
||||||
p_delta_long(&buf.bg_type, buf_from->bg_type, buf_to->bg_type, total_steps, current_step);
|
|
||||||
|
|
||||||
gimp_set_data("plug_in_paper_tile", &buf, sizeof(buf));
|
|
||||||
|
|
||||||
return 0; /* OK */
|
|
||||||
}
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
* p_plug_in_papertile_iter_ALT
|
||||||
|
* ----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
gint p_plug_in_papertile_iter_ALT(GRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct)
|
||||||
|
{
|
||||||
|
typedef struct t_plug_in_papertile_Vals
|
||||||
|
{
|
||||||
|
long tile_size;
|
||||||
|
long division_x;
|
||||||
|
long division_y;
|
||||||
|
gdouble move_max;
|
||||||
|
long fractional_type;
|
||||||
|
long centering;
|
||||||
|
long wrap_around;
|
||||||
|
long background_type;
|
||||||
|
gdouble background_color[4];
|
||||||
|
} t_plug_in_papertile_Vals;
|
||||||
|
int l_idx;
|
||||||
|
|
||||||
|
t_plug_in_papertile_Vals buf, *buf_from, *buf_to;
|
||||||
|
|
||||||
|
if(len_struct != sizeof(t_plug_in_papertile_Vals))
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ERROR: p_plug_in_papertile_iter_ALT stored Data missmatch in size %d != %d\n",
|
||||||
|
(int)len_struct, sizeof(t_plug_in_papertile_Vals) );
|
||||||
|
return -1; /* ERROR */
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_get_data("plug_in_papertile_ITER_FROM", g_plugin_data_from);
|
||||||
|
gimp_get_data("plug_in_papertile_ITER_TO", g_plugin_data_to);
|
||||||
|
|
||||||
|
buf_from = (t_plug_in_papertile_Vals *)&g_plugin_data_from[0];
|
||||||
|
buf_to = (t_plug_in_papertile_Vals *)&g_plugin_data_to[0];
|
||||||
|
memcpy(&buf, buf_from, sizeof(buf));
|
||||||
|
|
||||||
|
p_delta_long(&buf.tile_size, buf_from->tile_size, buf_to->tile_size, total_steps, current_step);
|
||||||
|
p_delta_long(&buf.division_x, buf_from->division_x, buf_to->division_x, total_steps, current_step);
|
||||||
|
p_delta_long(&buf.division_y, buf_from->division_y, buf_to->division_y, total_steps, current_step);
|
||||||
|
p_delta_gdouble(&buf.move_max, buf_from->move_max, buf_to->move_max, total_steps, current_step);
|
||||||
|
p_delta_long(&buf.fractional_type, buf_from->fractional_type, buf_to->fractional_type, total_steps, current_step);
|
||||||
|
p_delta_long(&buf.centering, buf_from->centering, buf_to->centering, total_steps, current_step);
|
||||||
|
p_delta_long(&buf.wrap_around, buf_from->wrap_around, buf_to->wrap_around, total_steps, current_step);
|
||||||
|
p_delta_long(&buf.background_type, buf_from->background_type, buf_to->background_type, total_steps, current_step);
|
||||||
|
|
||||||
|
for(l_idx=0; l_idx < 4; l_idx++)
|
||||||
|
{
|
||||||
|
p_delta_gdouble(&buf.background_color[l_idx], buf_from->background_color[l_idx], buf_to->background_color[l_idx], total_steps, current_step);
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_set_data("plug_in_papertile", &buf, sizeof(buf));
|
||||||
|
|
||||||
|
return 0; /* OK */
|
||||||
|
}
|
Loading…
Reference in New Issue