summaryrefslogtreecommitdiffstats
path: root/src/widgets/fill-style.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-07-04 03:15:58 +0000
committerJon A. Cruz <jon@joncruz.org>2010-07-04 03:15:58 +0000
commit5e0463d97c2a56fd7008750d8a897d3772bae946 (patch)
tree478b7893dfb13f63e933bb828c84634fa24e7ca1 /src/widgets/fill-style.cpp
parentMake order of 'auto' swatches match order in document. (diff)
downloadinkscape-5e0463d97c2a56fd7008750d8a897d3772bae946.tar.gz
inkscape-5e0463d97c2a56fd7008750d8a897d3772bae946.zip
Suppress gradient direction line for 'solid' gradients.
Removed unneeded and outdated macro use. (bzr r9564)
Diffstat (limited to 'src/widgets/fill-style.cpp')
-rw-r--r--src/widgets/fill-style.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index 19b8448c6..a0e343b58 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -556,11 +556,11 @@ void FillNStroke::updateFromPaint()
for (GSList const *i = items; i != NULL; i = i->next) {
//FIXME: see above
if (kind == FILL) {
- sp_repr_css_change_recursive(SP_OBJECT_REPR(i->data), css, "style");
+ sp_repr_css_change_recursive(reinterpret_cast<SPObject*>(i->data)->repr, css, "style");
}
if (!vector) {
- SPGradient *gr = sp_gradient_vector_for_object( document, desktop, SP_OBJECT(i->data), kind == FILL, createSwatch );
+ SPGradient *gr = sp_gradient_vector_for_object( document, desktop, reinterpret_cast<SPObject*>(i->data), kind == FILL, createSwatch );
if ( gr && createSwatch ) {
gr->setSwatch();
}
@@ -578,7 +578,7 @@ void FillNStroke::updateFromPaint()
for (GSList const *i = items; i != NULL; i = i->next) {
//FIXME: see above
if (kind == FILL) {
- sp_repr_css_change_recursive(SP_OBJECT_REPR(i->data), css, "style");
+ sp_repr_css_change_recursive(reinterpret_cast<SPObject*>(i->data)->repr, css, "style");
}
SPGradient *gr = sp_item_set_gradient(SP_ITEM(i->data), vector, gradient_type, kind == FILL);
@@ -608,7 +608,7 @@ void FillNStroke::updateFromPaint()
*/
} else {
- Inkscape::XML::Node *patrepr = SP_OBJECT_REPR(pattern);
+ Inkscape::XML::Node *patrepr = pattern->repr;
SPCSSAttr *css = sp_repr_css_attr_new();
gchar *urltext = g_strdup_printf("url(#%s)", patrepr->attribute("id"));
sp_repr_css_set_property(css, (kind == FILL) ? "fill" : "stroke", urltext);
@@ -622,17 +622,17 @@ void FillNStroke::updateFromPaint()
// objects who already have the same root pattern but through a different href
// chain. FIXME: move this to a sp_item_set_pattern
for (GSList const *i = items; i != NULL; i = i->next) {
- Inkscape::XML::Node *selrepr = SP_OBJECT_REPR(i->data);
+ Inkscape::XML::Node *selrepr = reinterpret_cast<SPObject*>(i->data)->repr;
if ( (kind == STROKE) && !selrepr) {
continue;
}
- SPObject *selobj = SP_OBJECT(i->data);
+ SPObject *selobj = reinterpret_cast<SPObject*>(i->data);
- SPStyle *style = SP_OBJECT_STYLE(selobj);
+ SPStyle *style = selobj->style;
if (style && ((kind == FILL) ? style->fill : style->stroke).isPaintserver()) {
- SPObject *server = (kind == FILL) ?
- SP_OBJECT_STYLE_FILL_SERVER(selobj) :
- SP_OBJECT_STYLE_STROKE_SERVER(selobj);
+ SPPaintServer *server = (kind == FILL) ?
+ selobj->style->getFillPaintServer() :
+ selobj->style->getStrokePaintServer();
if (SP_IS_PATTERN(server) && pattern_getroot(SP_PATTERN(server)) == pattern)
// only if this object's pattern is not rooted in our selected pattern, apply
continue;