diff --git a/ChangeLog b/ChangeLog index 15fbc451f1..d720269e05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-01-11 Pedro Gimeno + + * app/core/gimpdrawable-preview.c (gimp_drawable_preview_scale): + Apply threshold to alpha in the same way as it is applied to the + image in indexed mode. Fixes bug #115793, at least until the + alpha thresholds in indexed images are removed. + + * plug-ins/FractalExplorer/Display.c: Fix zoom undo handling + issues. Closes bug #82478. + 2004-01-11 Dave Neary * etc/templaterc: Remove unusual "1200x900" template. diff --git a/app/core/gimpdrawable-preview.c b/app/core/gimpdrawable-preview.c index 911765bba4..711bcd0129 100644 --- a/app/core/gimpdrawable-preview.c +++ b/app/core/gimpdrawable-preview.c @@ -312,8 +312,10 @@ gimp_drawable_preview_scale (GimpImageBaseType type, r[GREEN_PIX] += cmap[index++] * tot_frac; r[BLUE_PIX] += cmap[index++] * tot_frac; - if (bytes == 4) - r[ALPHA_PIX] += s[ALPHA_I_PIX] * tot_frac; + if (bytes == 4) + r[ALPHA_PIX] += ((s[ALPHA_I_PIX] & 0x80 ? + OPAQUE_OPACITY : TRANSPARENT_OPACITY) + * tot_frac); } else { diff --git a/plug-ins/FractalExplorer/Dialogs.c b/plug-ins/FractalExplorer/Dialogs.c index e2f1662b79..d180f70906 100644 --- a/plug-ins/FractalExplorer/Dialogs.c +++ b/plug-ins/FractalExplorer/Dialogs.c @@ -22,6 +22,7 @@ #define RESPONSE_ABOUT 1 +#define ZOOM_UNDO_SIZE 100 static gdouble *gradient_samples = NULL; @@ -32,9 +33,9 @@ static DialogElements *elements = NULL; static GtkWidget *cmap_preview; static GtkWidget *maindlg; -static explorer_vals_t zooms[100]; -static gint zoomindex = 1; -static gint zoommax = 1; +static explorer_vals_t zooms[ZOOM_UNDO_SIZE]; +static gint zoomindex = 0; +static gint zoommax = 0; static gint oldxpos = -1; static gint oldypos = -1; @@ -143,7 +144,7 @@ static void dialog_undo_zoom_callback (GtkWidget *widget, gpointer data) { - if (zoomindex > 1) + if (zoomindex > 0) { zooms[zoomindex] = wvals; zoomindex--; @@ -175,11 +176,12 @@ dialog_step_in_callback (GtkWidget *widget, double xdifferenz; double ydifferenz; - if (zoomindex < zoommax) + if (zoomindex < ZOOM_UNDO_SIZE - 1) { zooms[zoomindex]=wvals; zoomindex++; } + zoommax = zoomindex; xdifferenz = wvals.xmax - wvals.xmin; ydifferenz = wvals.ymax - wvals.ymin; @@ -201,11 +203,12 @@ dialog_step_out_callback (GtkWidget *widget, gdouble xdifferenz; gdouble ydifferenz; - if (zoomindex < zoommax) + if (zoomindex < ZOOM_UNDO_SIZE - 1) { zooms[zoomindex]=wvals; zoomindex++; } + zoommax = zoomindex; xdifferenz = wvals.xmax - wvals.xmin; ydifferenz = wvals.ymax - wvals.ymin; @@ -459,10 +462,11 @@ preview_button_release_event (GtkWidget *widget, l_ymax = (wvals.ymin + (wvals.ymax - wvals.ymin) * (y_release / preview_height)); - zooms[zoomindex] = wvals; - zoomindex++; - if (zoomindex > 99) - zoomindex = 99; + if (zoomindex < ZOOM_UNDO_SIZE - 1) + { + zooms[zoomindex] = wvals; + zoomindex++; + } zoommax = zoomindex; wvals.xmin = l_xmin; wvals.xmax = l_xmax;