Commit abcf984b authored by Philip Lafleur's avatar Philip Lafleur Committed by Philip Lafleur
Browse files

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.
parent 309bf009
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 */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment