mirror of https://github.com/GNOME/gimp.git
don't pass bogus [0..255] opacities to gimp_paint_core_paste_canvas() but
2002-05-29 Michael Natterer <mitch@gimp.org> * app/paint/gimppencil.c: don't pass bogus [0..255] opacities to gimp_paint_core_paste_canvas() but use gdouble values in a [0.0..1.0] range. Spotted by Jakub Steiner.
This commit is contained in:
parent
8215391f22
commit
440a599ec6
|
@ -1,3 +1,9 @@
|
|||
2002-05-29 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/paint/gimppencil.c: don't pass bogus [0..255] opacities to
|
||||
gimp_paint_core_paste_canvas() but use gdouble values in a
|
||||
[0.0..1.0] range. Spotted by Jakub Steiner.
|
||||
|
||||
2002-05-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/paint-funcs/Makefile.am: set include paths in AM_ASFLAGS for
|
||||
|
|
|
@ -144,7 +144,7 @@ gimp_pencil_motion (GimpPaintCore *paint_core,
|
|||
GimpContext *context;
|
||||
TempBuf *area;
|
||||
guchar col[MAX_CHANNELS];
|
||||
gint opacity;
|
||||
gdouble opacity;
|
||||
gdouble scale;
|
||||
GimpPaintApplicationMode paint_appl_mode;
|
||||
|
||||
|
@ -201,15 +201,15 @@ gimp_pencil_motion (GimpPaintCore *paint_core,
|
|||
area->bytes);
|
||||
}
|
||||
|
||||
opacity = 255 * gimp_context_get_opacity (context);
|
||||
opacity = gimp_context_get_opacity (context);
|
||||
|
||||
if (paint_options->pressure_options->opacity)
|
||||
opacity = opacity * 2.0 * paint_core->cur_coords.pressure;
|
||||
|
||||
/* paste the newly painted canvas to the gimage which is being worked on */
|
||||
gimp_paint_core_paste_canvas (paint_core, drawable,
|
||||
MIN (opacity, 255),
|
||||
gimp_context_get_opacity (context) * 255,
|
||||
MIN (opacity, GIMP_OPACITY_OPAQUE),
|
||||
gimp_context_get_opacity (context),
|
||||
gimp_context_get_paint_mode (context),
|
||||
GIMP_BRUSH_HARD, scale, paint_appl_mode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue