Invert doesnt work on objects with gradients.

Bug #367548 reported by dopelover
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
John Smith

Bug Description

Right-clicking on fill and stroke widget in lower right corner of main window, and then selecting Invert from popuped menu doesn't work when selected object has a gradient fill or gradient stroke.

Inkscape r21234 on Ubuntu 9.04

Tags: gradient ui
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Ubuntu 9.04, build 21237.
I don't think it ever worked (I also tried with 0.46), so I mark it Wishlist. Can anyone confirm?

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
jazzynico (jazzynico)
tags: added: gradient ui
Revision history for this message
John Smith (john-smithi) wrote :

Should be fixed by trunk commit r11694.

Changed in inkscape:
assignee: nobody → John Smith (john-smithi)
status: Confirmed → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

Hmm, this is an odd fix AFAIU: 'Invert' from context menu of the current fill/stroke swatch in the status bar _reverts_ the direction of the gradient instead of inverting the color(s) as is done for normal flat colors.

Revision history for this message
John Smith (john-smithi) wrote :

Yes, i agree the language is a little odd.
But if you press the "Reverse the gradient direction" from the gradient toolbar, or use <Shift>+r from the gradient tool, then you see "Invert gradient" in Undo history. The words "reverse" and "invert" are both used for the same thing.

So currently "Invert" from the selected style bottom status bar context menu:
* When a stop is selected and then stops color is inverted.
* If no stops are selected then the gradient is "inverted" (or reversed).

What do you think should happen when no stop is selected ?

Revision history for this message
ScislaC (scislac) wrote :

I think a distinction can be made... inverting a gradient is reversing (it makes sense English-wise)... but a new "invert gradient color(s)" function is sensible on no selection imho.

Revision history for this message
su_v (suv-lp) wrote :

> Yes, i agree the language is a little odd. But if you press the
> "Reverse the gradient direction" from the gradient toolbar, or use
> <Shift>+r from the gradient tool, then you see "Invert gradient" in
> Undo history.

I didn't look at the undo history TBH. My spontaneous reaction was: reverting a gradient is not the same as inverting colors.

> What do you think should happen when no stop is selected ?

My personal expectation would be that the colors of all stops are inverted.

For reversing the gradient direction, I'd be looking for a separate menu entry (if at all present in that context menu).

Revision history for this message
su_v (suv-lp) wrote :

Some new warnings when compiling r11694 and later… :
  CXX gradient-chemistry.o
../../src/gradient-chemistry.cpp: In function ‘SPGradient* getGradient(SPItem*, Inkscape::PaintTarget)’:
../../src/gradient-chemistry.cpp:568: warning: enumeration value ‘FOR_FILL_AND_STROKE’ not handled in switch
  CXX gradient-drag.o
../../src/gradient-drag.cpp: In member function ‘SPObject* GrDraggable::getServer()’:
../../src/gradient-drag.cpp:724: warning: enumeration value ‘FOR_FILL_AND_STROKE’ not handled in switch

Revision history for this message
John Smith (john-smithi) wrote :

r11696 should invert the colors of all stops if no stop is selected.
Also changes the Undo history to "Reverse gradient" when reversing a gradient.

su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.49
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.