diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-09-22 09:59:01 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-09-22 09:59:01 +0000 |
| commit | a8e76949f48267a704af633032e33d6982c682cc (patch) | |
| tree | b7363e4c0d1d41470e0b72c535487a429062a40a /src/ui/widget/selected-style.cpp | |
| parent | Fix for 166691 : Revert fix (diff) | |
| download | inkscape-a8e76949f48267a704af633032e33d6982c682cc.tar.gz inkscape-a8e76949f48267a704af633032e33d6982c682cc.zip | |
Fix for 367548 : Invert doesnt work on objects with gradients
(bzr r11694)
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
| -rw-r--r-- | src/ui/widget/selected-style.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index a37f36eea..b3c4fbdcd 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -48,6 +48,7 @@ #include "pixmaps/cursor-adj-s.xpm" #include "pixmaps/cursor-adj-l.xpm" #include "sp-cursor.h" +#include "gradient-chemistry.h" static gdouble const _sw_presets[] = { 32 , 16 , 10 , 8 , 6 , 4 , 3 , 2 , 1.5 , 1 , 0.75 , 0.5 , 0.25 , 0.1 }; static gchar const *const _sw_presets_str[] = {"32", "16", "10", "8", "6", "4", "3", "2", "1.5", "1", "0.75", "0.5", "0.25", "0.1"}; @@ -598,6 +599,12 @@ void SelectedStyle::on_fill_invert() { SPCSSAttr *css = sp_repr_css_attr_new (); guint32 color = _thisselected[SS_FILL]; gchar c[64]; + if (_mode[SS_FILL] == SS_LGRADIENT || _mode[SS_FILL] == SS_RGRADIENT) { + g_message("Gradient"); + sp_gradient_invert_selected_gradients(_desktop, Inkscape::FOR_FILL); + return; + } + if (_mode[SS_FILL] != SS_COLOR) return; sp_svg_write_color (c, sizeof(c), SP_RGBA32_U_COMPOSE( @@ -618,6 +625,11 @@ void SelectedStyle::on_stroke_invert() { SPCSSAttr *css = sp_repr_css_attr_new (); guint32 color = _thisselected[SS_STROKE]; gchar c[64]; + if (_mode[SS_FILL] == SS_LGRADIENT || _mode[SS_FILL] == SS_RGRADIENT) { + g_message("Gradient"); + sp_gradient_invert_selected_gradients(_desktop, Inkscape::FOR_STROKE); + return; + } if (_mode[SS_STROKE] != SS_COLOR) return; sp_svg_write_color (c, sizeof(c), SP_RGBA32_U_COMPOSE( |
