mirror of https://github.com/GNOME/gimp.git
avoided some redundant calculations.
2004-06-10 Philip Lafleur <plafleur@cvs.gnome.org> * app/paint/gimpbrushcore.c (gimp_brush_core_pressurize_mask): avoided some redundant calculations.
This commit is contained in:
parent
309bf0098f
commit
abcf984b66
|
@ -1,3 +1,8 @@
|
|||
2004-06-10 Philip Lafleur <plafleur@cvs.gnome.org>
|
||||
|
||||
* app/paint/gimpbrushcore.c (gimp_brush_core_pressurize_mask):
|
||||
avoided some redundant calculations.
|
||||
|
||||
2004-06-10 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/gui/user-install-dialog.c: removed the monitor calibration
|
||||
|
|
|
@ -1057,15 +1057,22 @@ gimp_brush_core_pressurize_mask (GimpBrushCore *core,
|
|||
}
|
||||
#else /* ! FANCY_PRESSURE */
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
gint tmp = (pressure / 0.5) * i;
|
||||
{
|
||||
gdouble j, k;
|
||||
|
||||
if (tmp > 255)
|
||||
mapi[i] = 255;
|
||||
else
|
||||
mapi[i] = tmp;
|
||||
}
|
||||
j = pressure + pressure;
|
||||
k = 0;
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
if (k > 255)
|
||||
mapi[i] = 255;
|
||||
else
|
||||
mapi[i] = (guchar) k;
|
||||
|
||||
k += j;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* FANCY_PRESSURE */
|
||||
|
||||
|
|
Loading…
Reference in New Issue