summaryrefslogtreecommitdiffstats
path: root/src/widgets/stroke-style.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-12-25 19:30:29 +0000
committertavmjong-free <tavmjong@free.fr>2014-12-25 19:30:29 +0000
commit05f2f043bdbadefa4ea435981e1a728420d6b93c (patch)
tree134097c69539d87e64940ab1a86642daac555281 /src/widgets/stroke-style.cpp
parentRemove sp_style_merge_from_parent() and sp_style_merge_from_dying_parent(). (diff)
downloadinkscape-05f2f043bdbadefa4ea435981e1a728420d6b93c.tar.gz
inkscape-05f2f043bdbadefa4ea435981e1a728420d6b93c.zip
Remove sp_style_new().
(bzr r13822.1.6)
Diffstat (limited to '')
-rw-r--r--src/widgets/stroke-style.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 755489e12..5ca06a795 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -815,13 +815,13 @@ StrokeStyle::updateLine()
FillOrStroke kind = GPOINTER_TO_INT(get_data("kind")) ? FILL : STROKE;
// create temporary style
- SPStyle *query = sp_style_new (SP_ACTIVE_DOCUMENT);
+ SPStyle query(SP_ACTIVE_DOCUMENT);
// query into it
- int result_sw = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_STROKEWIDTH);
- int result_ml = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_STROKEMITERLIMIT);
- int result_cap = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_STROKECAP);
- int result_join = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_STROKEJOIN);
- SPIPaint &targPaint = (kind == FILL) ? query->fill : query->stroke;
+ int result_sw = sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_STROKEWIDTH);
+ int result_ml = sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_STROKEMITERLIMIT);
+ int result_cap = sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_STROKECAP);
+ int result_join = sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_STROKEJOIN);
+ SPIPaint &targPaint = (kind == FILL) ? query.fill : query.stroke;
if (!sel || sel->isEmpty()) {
// Nothing selected, grey-out all controls in the stroke-style dialog
@@ -846,7 +846,7 @@ StrokeStyle::updateLine()
Inkscape::Util::Unit const *unit = unitSelector->getUnit();
if (unit->type == Inkscape::Util::UNIT_TYPE_LINEAR) {
- double avgwidth = Inkscape::Util::Quantity::convert(query->stroke_width.computed, "px", unit);
+ double avgwidth = Inkscape::Util::Quantity::convert(query.stroke_width.computed, "px", unit);
#if WITH_GTKMM_3_0
(*widthAdj)->set_value(avgwidth);
#else
@@ -879,27 +879,25 @@ StrokeStyle::updateLine()
if (result_ml != QUERY_STYLE_NOTHING)
#if WITH_GTKMM_3_0
- (*miterLimitAdj)->set_value(query->stroke_miterlimit.value); // TODO: reflect averagedness?
+ (*miterLimitAdj)->set_value(query.stroke_miterlimit.value); // TODO: reflect averagedness?
#else
- miterLimitAdj->set_value(query->stroke_miterlimit.value); // TODO: reflect averagedness?
+ miterLimitAdj->set_value(query.stroke_miterlimit.value); // TODO: reflect averagedness?
#endif
if (result_join != QUERY_STYLE_MULTIPLE_DIFFERENT &&
result_join != QUERY_STYLE_NOTHING ) {
- setJoinType(query->stroke_linejoin.value);
+ setJoinType(query.stroke_linejoin.value);
} else {
setJoinButtons(NULL);
}
if (result_cap != QUERY_STYLE_MULTIPLE_DIFFERENT &&
result_cap != QUERY_STYLE_NOTHING ) {
- setCapType (query->stroke_linecap.value);
+ setCapType (query.stroke_linecap.value);
} else {
setCapButtons(NULL);
}
- sp_style_unref(query);
-
if (!sel || sel->isEmpty())
return;