ported to GimpPreviewArea.

* plug-ins/common/gqbist.c: ported to GimpPreviewArea.
This commit is contained in:
David Odin
2004-07-31 19:31:57 +00:00
parent 2f15fdfbe6
commit f5d9c8f20f
2 changed files with 258 additions and 258 deletions

View File

@ -1,3 +1,7 @@
2004-07-31 DindinX <david@dindinx.org>
* plug-ins/common/gqbist.c: ported to GimpPreviewArea.
2004-07-31 DindinX <david@dindinx.org>
* plug-ins/common/fractaltrace.c: ported to GimpPreviewArea.

View File

@ -36,11 +36,6 @@
#include <string.h>
#include <time.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
@ -578,20 +573,21 @@ dialog_update_previews (GtkWidget *widget,
gpointer data)
{
gint i, j;
guchar buf[PREVIEW_SIZE * 3];
guchar buf[PREVIEW_SIZE * PREVIEW_SIZE * 3];
for (j = 0; j < 9; j++)
{
optimize (&info[(j + 5) % 9]);
for (i = 0; i < PREVIEW_SIZE; i++)
{
qbist (&info[(j + 5) % 9], buf,
qbist (&info[(j + 5) % 9], buf + i * PREVIEW_SIZE * 3,
0, i, PREVIEW_SIZE, PREVIEW_SIZE, PREVIEW_SIZE, 3, 1);
gtk_preview_draw_row (GTK_PREVIEW (preview[j]), buf,
0, i, PREVIEW_SIZE);
}
gtk_widget_queue_draw (preview[j]);
gimp_preview_area_draw (GIMP_PREVIEW_AREA (preview[j]),
0, 0, PREVIEW_SIZE, PREVIEW_SIZE,
GIMP_RGB_IMAGE,
buf,
PREVIEW_SIZE *3);
}
}
@ -843,8 +839,8 @@ dialog_run (void)
G_CALLBACK (dialog_select_preview),
(gpointer) & (info[(i + 5) % 9]));
preview[i] = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (preview[i]), PREVIEW_SIZE, PREVIEW_SIZE);
preview[i] = gimp_preview_area_new ();
gtk_widget_set_size_request (preview[i], PREVIEW_SIZE, PREVIEW_SIZE);
gtk_container_add (GTK_CONTAINER (button), preview[i]);
gtk_widget_show (preview[i]);
}
@ -881,8 +877,8 @@ dialog_run (void)
G_CALLBACK (dialog_save),
NULL);
dialog_update_previews (NULL, NULL);
gtk_widget_show (dialog);
dialog_update_previews (NULL, NULL);
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);