diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-19 03:05:11 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-19 03:05:11 +0000 |
| commit | 36107da1d03ee8891eee8dd53f12274ab7430221 (patch) | |
| tree | b1adda5157cf88585eddcbbbd4a2a41419e75531 /src/display/inkscape-cairo.cpp | |
| parent | make arena remember its parent canvasarena, if any (so that an arenaitem can ... (diff) | |
| download | inkscape-36107da1d03ee8891eee8dd53f12274ab7430221.tar.gz inkscape-36107da1d03ee8891eee8dd53f12274ab7430221.zip | |
switch to using NR::Maybe for area rect
(bzr r2713)
Diffstat (limited to 'src/display/inkscape-cairo.cpp')
| -rw-r--r-- | src/display/inkscape-cairo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/display/inkscape-cairo.cpp b/src/display/inkscape-cairo.cpp index 9a8500885..5d87d39b2 100644 --- a/src/display/inkscape-cairo.cpp +++ b/src/display/inkscape-cairo.cpp @@ -46,11 +46,13 @@ nr_create_cairo_context (NRRectL *area, NRPixBlock *pb) /** Feeds path-creating calls to the cairo context translating them from the SPCurve, with the given transform and shift */ void -feed_curve_to_cairo (cairo_t *ct, NArtBpath *bpath, NR::Matrix trans, NR::Rect area, bool optimize_stroke, double stroke_width) +feed_curve_to_cairo (cairo_t *ct, NArtBpath *bpath, NR::Matrix trans, NR::Maybe<NR::Rect> area, bool optimize_stroke, double stroke_width) { NR::Point next(0,0), last(0,0); - NR::Point shift = area.min(); - NR::Rect view = area; + if (!area || area->isEmpty()) + return; + NR::Point shift = area->min(); + NR::Rect view = *area; view.growBy (stroke_width); NR::Rect swept; bool closed = false; |
