mirror of https://github.com/GNOME/gimp.git
Apply threshold to alpha in the same way as it is applied to the image in
2004-01-11 Pedro Gimeno <pggimeno@wanadoo.es> * 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.
This commit is contained in:
parent
270bdd5b5f
commit
672f27dde9
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-01-11 Pedro Gimeno <pggimeno@wanadoo.es>
|
||||
|
||||
* 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 <bolsh@gimp.org>
|
||||
|
||||
* etc/templaterc: Remove unusual "1200x900" template.
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue