summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
Diffstat (limited to 'src/display')
-rw-r--r--src/display/curve.cpp12
-rw-r--r--src/display/curve.h1
-rw-r--r--src/display/drawing-shape.cpp4
3 files changed, 15 insertions, 2 deletions
diff --git a/src/display/curve.cpp b/src/display/curve.cpp
index b6c387034..1998e9bec 100644
--- a/src/display/curve.cpp
+++ b/src/display/curve.cpp
@@ -302,6 +302,18 @@ SPCurve::is_empty() const
}
/**
+ * True if paths are in curve. If it only contains a path with only a moveto, the path is considered as unset FALSE
+ */
+bool
+SPCurve::is_unset() const
+{
+ if (get_segment_count()) {
+ return false;
+ }
+ return true;
+}
+
+/**
* True iff all subpaths are closed.
* Returns false if the curve is empty.
*/
diff --git a/src/display/curve.h b/src/display/curve.h
index 42b899210..72e6df95c 100644
--- a/src/display/curve.h
+++ b/src/display/curve.h
@@ -43,6 +43,7 @@ public:
size_t nodes_in_path() const;
bool is_empty() const;
+ bool is_unset() const;
bool is_closed() const;
Geom::Curve const * last_segment() const;
Geom::Path const * last_path() const;
diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp
index ba95a63ce..d7329e670 100644
--- a/src/display/drawing-shape.cpp
+++ b/src/display/drawing-shape.cpp
@@ -217,7 +217,7 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne
}
{ Inkscape::DrawingContext::Save save(dc);
dc.setSource(rgba);
- dc.setLineWidth(5);
+ dc.setLineWidth(0.5);
dc.setTolerance(0.5);
dc.stroke();
}
@@ -234,7 +234,6 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne
// we assume the context has no path
Inkscape::DrawingContext::Save save(dc);
dc.transform(_ctm);
- dc.path(_curve->get_pathvector());
// update fill and stroke paints.
@@ -244,6 +243,7 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne
bool has_stroke = _nrstyle.prepareStroke(dc, _item_bbox, _stroke_pattern);
has_stroke &= (_nrstyle.stroke_width != 0);
if (has_fill || has_stroke) {
+ dc.path(_curve->get_pathvector());
// TODO: remove segments outside of bbox when no dashes present
if (has_fill) {
_nrstyle.applyFill(dc);