ported to GimpPreviewArea.
* plug-ins/common/gqbist.c: ported to GimpPreviewArea.
This commit is contained in:
@ -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>
|
2004-07-31 DindinX <david@dindinx.org>
|
||||||
|
|
||||||
* plug-ins/common/fractaltrace.c: ported to GimpPreviewArea.
|
* plug-ins/common/fractaltrace.c: ported to GimpPreviewArea.
|
||||||
|
@ -36,11 +36,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#warning GTK_DISABLE_DEPRECATED
|
|
||||||
#endif
|
|
||||||
#undef GTK_DISABLE_DEPRECATED
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
@ -578,20 +573,21 @@ dialog_update_previews (GtkWidget *widget,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
gint i, j;
|
gint i, j;
|
||||||
guchar buf[PREVIEW_SIZE * 3];
|
guchar buf[PREVIEW_SIZE * PREVIEW_SIZE * 3];
|
||||||
|
|
||||||
for (j = 0; j < 9; j++)
|
for (j = 0; j < 9; j++)
|
||||||
{
|
{
|
||||||
optimize (&info[(j + 5) % 9]);
|
optimize (&info[(j + 5) % 9]);
|
||||||
for (i = 0; i < PREVIEW_SIZE; i++)
|
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);
|
0, i, PREVIEW_SIZE, PREVIEW_SIZE, PREVIEW_SIZE, 3, 1);
|
||||||
gtk_preview_draw_row (GTK_PREVIEW (preview[j]), buf,
|
|
||||||
0, i, PREVIEW_SIZE);
|
|
||||||
}
|
}
|
||||||
|
gimp_preview_area_draw (GIMP_PREVIEW_AREA (preview[j]),
|
||||||
gtk_widget_queue_draw (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),
|
G_CALLBACK (dialog_select_preview),
|
||||||
(gpointer) & (info[(i + 5) % 9]));
|
(gpointer) & (info[(i + 5) % 9]));
|
||||||
|
|
||||||
preview[i] = gtk_preview_new (GTK_PREVIEW_COLOR);
|
preview[i] = gimp_preview_area_new ();
|
||||||
gtk_preview_size (GTK_PREVIEW (preview[i]), PREVIEW_SIZE, PREVIEW_SIZE);
|
gtk_widget_set_size_request (preview[i], PREVIEW_SIZE, PREVIEW_SIZE);
|
||||||
gtk_container_add (GTK_CONTAINER (button), preview[i]);
|
gtk_container_add (GTK_CONTAINER (button), preview[i]);
|
||||||
gtk_widget_show (preview[i]);
|
gtk_widget_show (preview[i]);
|
||||||
}
|
}
|
||||||
@ -881,8 +877,8 @@ dialog_run (void)
|
|||||||
G_CALLBACK (dialog_save),
|
G_CALLBACK (dialog_save),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
dialog_update_previews (NULL, NULL);
|
|
||||||
gtk_widget_show (dialog);
|
gtk_widget_show (dialog);
|
||||||
|
dialog_update_previews (NULL, NULL);
|
||||||
|
|
||||||
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
|
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user