summaryrefslogtreecommitdiffstats
path: root/src/sp-paint-server.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-06-28 03:16:09 +0000
committerJon A. Cruz <jon@joncruz.org>2010-06-28 03:16:09 +0000
commit7e8ffe9fb3b42470802ed080dc827fdda32165b3 (patch)
treeb299fd5c823e786eb2baf6c92c02c38592be0d97 /src/sp-paint-server.cpp
parentImplementing the "Convert" popup menu item for gradients/swatches. Part of bu... (diff)
downloadinkscape-7e8ffe9fb3b42470802ed080dc827fdda32165b3.tar.gz
inkscape-7e8ffe9fb3b42470802ed080dc827fdda32165b3.zip
Partial C++-ification of SPGradient
(bzr r9542)
Diffstat (limited to 'src/sp-paint-server.cpp')
-rw-r--r--src/sp-paint-server.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/sp-paint-server.cpp b/src/sp-paint-server.cpp
index 258323a93..5858f9a0e 100644
--- a/src/sp-paint-server.cpp
+++ b/src/sp-paint-server.cpp
@@ -160,12 +160,7 @@ bool SPPaintServer::isSwatch() const
bool swatch = false;
if (SP_IS_GRADIENT(this)) {
SPGradient *grad = SP_GRADIENT(this);
- if ( SP_GRADIENT_HAS_STOPS(grad) ) {
- gchar const * attr = repr->attribute("osb:paint");
- if (attr && !strcmp(attr, "solid")) {
- swatch = true;
- }
- }
+ swatch = grad->hasStops() && repr->attribute("osb:paint");
}
return swatch;
}
@@ -175,7 +170,7 @@ bool SPPaintServer::isSolid() const
bool solid = false;
if (SP_IS_GRADIENT(this)) {
SPGradient *grad = SP_GRADIENT(this);
- if ( SP_GRADIENT_HAS_STOPS(grad) && (grad->getStopCount() == 0) ) {
+ if ( grad->hasStops() && (grad->getStopCount() == 0) ) {
gchar const * attr = repr->attribute("osb:paint");
if (attr && !strcmp(attr, "solid")) {
solid = true;