diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-09-23 17:24:25 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-09-23 17:24:25 +0000 |
| commit | ac16411f213f98407fc42c1d04eb4ae6c187e4a6 (patch) | |
| tree | b8fd94caee6b202043810a7366ab3f032882a48f /src/ui/widget/selected-style.cpp | |
| parent | add newly linked-in m4 files to .bzrignore (diff) | |
| parent | Fix for 170395 : Add Trace Bitmap to context menu of images : Focus fix (diff) | |
| download | inkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.tar.gz inkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.zip | |
merge from trunk (r11698)
(bzr r11668.1.10)
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
| -rw-r--r-- | src/ui/widget/selected-style.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index a37f36eea..a4313f677 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) { + 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,10 @@ void SelectedStyle::on_stroke_invert() { SPCSSAttr *css = sp_repr_css_attr_new (); guint32 color = _thisselected[SS_STROKE]; gchar c[64]; + if (_mode[SS_STROKE] == SS_LGRADIENT || _mode[SS_STROKE] == SS_RGRADIENT) { + 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( |
