Comment 0 for bug 1281859

Revision history for this message
Cojnel (cojnel) wrote :

r13033
linux mint 16 32bit
default preferences

Color gestures:
with the alt modifier key held down,
the alpha values can be set down to -0.5 and up to 1.5,
when the alpha value is changed on a gradient stop,
and the value is outside 0 and 1,
then the terminal outputs a critical message (see below).

With no modifier key held down:
The hues status bar "was" section shows
values like, 1.12e-08 and -9.31e-10,
when the cursor is in the bottom right
half of the screen.

Reproduced by:
1. draw a rect
2. draw a gradient on the rectangle
3. with one of the gradients stops selected
4. hold down the left mouse button on the
  fill style indicator in the bottom left
  corner and drag the mouse cursor onto
  the canvas
5. hold down the alt key and move the mouse
  slightly to update the status bar message,
  the alpha/opacity starts with a value of 1.0
6. move the cursor towards the top left,
  the alpha value goes up to 1.5,
  and the terminal outputs:

** (inkscape:6661): CRITICAL **: guint32 SPColor::toRGBA32(gdouble) const: assertion 'alpha <= 1.0' failed

Expected result:
The alpha should be limited to 1.0 as it's
highest value, and 0 as it's lowest value.

Actual result:
The alpha values go up to 1.5 and down to -0.5,
and outputs the error message,
when applied to a gradient stop.

Additional notes:
When the alpha for the gradient stop is
below 0 or above 1, then any transformation
done to the rect will output more of those messages.

The range of the color gestures alpha is
0.5 below or above the starting value.

The alpha of a gradient stop gets reset to 1
when the alt modifier is released and the
mouse is moved, to see that it's value can
go down to -0.5,
open the xml editor and select a gradient stop,
it's under
<svg:svg...>
 <svg:defs...>
  <svg:linearGradient...>
   <svg:stop...>
then select the style attribute,

follow steps 1 to 5 above, but move to the
bottom right corner, keep holding down the
alt modifier key and release the mouse button,
now repeat the process above with the alt key
pressed, eventually the stop-opacity reaches -0.5.

The alpha can also be changed outside
the 0 to 1 range on other objects aswell
(shape, text, path), but no error messages
are produced, and the opacity doesn't return
to 1 after releasing the alt key,
so it's easier to reproduce the outlier values.

On the fill and stroke page of the inkscape manual:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes-Fill-Stroke.html

In the Color Gestures section, it states that:
"The Alt modifier disables changes to the color
so that the cursor can be repositioned."

Since the alt modifier key changes the
alpha instead of disabling changes,
then the manual should probably be updated.