167
static GimpParamDef gih_save_args[] =
169
static const GimpParamDef gih_save_args[] =
169
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
170
{ GIMP_PDB_IMAGE, "image", "Input image" },
171
{ GIMP_PDB_DRAWABLE, "drawable", "Drawable to save" },
172
{ GIMP_PDB_STRING, "filename", "The name of the file to save the brush pipe in" },
173
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to save the brush pipe in" },
174
{ GIMP_PDB_INT32, "spacing", "Spacing of the brush" },
175
{ GIMP_PDB_STRING, "description", "Short description of the brush pipe" },
176
{ GIMP_PDB_INT32, "cell_width", "Width of the brush cells" },
177
{ GIMP_PDB_INT32, "cell_height", "Width of the brush cells" },
178
{ GIMP_PDB_INT8, "display_cols", "Display column number" },
179
{ GIMP_PDB_INT8, "display_rows", "Display row number" },
180
{ GIMP_PDB_INT32, "dimension", "Dimension of the brush pipe" },
171
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
172
{ GIMP_PDB_IMAGE, "image", "Input image" },
173
{ GIMP_PDB_DRAWABLE, "drawable", "Drawable to save" },
174
{ GIMP_PDB_STRING, "filename", "The name of the file to save the brush pipe in" },
175
{ GIMP_PDB_STRING, "raw-filename", "The name of the file to save the brush pipe in" },
176
{ GIMP_PDB_INT32, "spacing", "Spacing of the brush" },
177
{ GIMP_PDB_STRING, "description", "Short description of the brush pipe" },
178
{ GIMP_PDB_INT32, "cell-width", "Width of the brush cells" },
179
{ GIMP_PDB_INT32, "cell-height", "Width of the brush cells" },
180
{ GIMP_PDB_INT8, "display-cols", "Display column number" },
181
{ GIMP_PDB_INT8, "display-rows", "Display row number" },
182
{ GIMP_PDB_INT32, "dimension", "Dimension of the brush pipe" },
181
183
/* The number of rank and sel args depend on the dimension */
182
{ GIMP_PDB_INT8ARRAY,"rank", "Ranks of the dimensions" },
183
{ GIMP_PDB_INT32, "dimension", "Dimension (again)" },
184
{ GIMP_PDB_STRINGARRAY, "sel", "Selection modes" }
187
static GimpParamDef gih_load_args[] =
189
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
190
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
191
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to load" }
193
static GimpParamDef gih_load_return_vals[] =
195
{ GIMP_PDB_IMAGE, "image", "Output image" }
199
gimp_install_procedure ("file_gih_load",
184
{ GIMP_PDB_INT8ARRAY, "rank", "Ranks of the dimensions" },
185
{ GIMP_PDB_INT32, "dimension", "Dimension (again)" },
186
{ GIMP_PDB_STRINGARRAY, "sel", "Selection modes" }
189
static const GimpParamDef gih_load_args[] =
191
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
192
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
193
{ GIMP_PDB_STRING, "raw-filename", "The name of the file to load" }
195
static const GimpParamDef gih_load_return_vals[] =
197
{ GIMP_PDB_IMAGE, "image", "Output image" }
201
gimp_install_procedure (LOAD_PROC,
200
202
"loads images in GIMP brush pipe format",
201
203
"This plug-in loads a GIMP brush pipe as an image.",
202
204
"Jens Lautenbacher, Sven Neumann",
209
211
G_N_ELEMENTS (gih_load_return_vals),
210
212
gih_load_args, gih_load_return_vals);
212
gimp_plugin_icon_register ("file_gih_load",
213
GIMP_ICON_TYPE_STOCK_ID, GIMP_STOCK_BRUSH);
214
gimp_register_file_handler_mime ("file_gih_load", "image/x-gimp-gih");
215
gimp_register_magic_load_handler ("file_gih_load",
214
gimp_plugin_icon_register (LOAD_PROC, GIMP_ICON_TYPE_STOCK_ID,
215
(const guint8 *) GIMP_STOCK_BRUSH);
216
gimp_register_file_handler_mime (LOAD_PROC, "image/x-gimp-gih");
217
gimp_register_magic_load_handler (LOAD_PROC,
220
gimp_install_procedure ("file_gih_save",
222
gimp_install_procedure (SAVE_PROC,
221
223
"saves images in GIMP brush pipe format",
222
224
"This plug-in saves an image in the GIMP brush pipe format. The image must have an alpha chnannel and can be multi-layered, and additionally the layers can be divided into a rectangular array of brushes.",
867
dlg = gimp_dialog_new (_("Save as Brush Pipe"), "gih",
869
gimp_standard_help_func, "file-gih-save",
871
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
872
GTK_STOCK_OK, GTK_RESPONSE_OK,
866
dialog = gimp_dialog_new (_("Save as Brush Pipe"), PLUG_IN_BINARY,
868
gimp_standard_help_func, SAVE_PROC,
870
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
871
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
875
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
880
gimp_window_set_transient (GTK_WINDOW (dialog));
876
882
/* The main table */
877
883
table = gtk_table_new (8, 2, FALSE);
878
884
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
879
885
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
880
886
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
881
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), table, TRUE, TRUE, 0);
887
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0);
882
888
gtk_widget_show (table);