diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-05-09 17:06:59 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-05-09 17:06:59 +0000 |
| commit | b5fbebdee9ad52de4b9b373998d91581b9fd9004 (patch) | |
| tree | 31f6f2cdab11f3276ef6abad0775e8b6888e1d33 /src/display | |
| parent | Apply Sas' patch to improve import of SVG as in LP#227472 and the bugs mentio... (diff) | |
| download | inkscape-b5fbebdee9ad52de4b9b373998d91581b9fd9004.tar.gz inkscape-b5fbebdee9ad52de4b9b373998d91581b9fd9004.zip | |
complete adding const to have only NArtBpath const * get_bpath() const; for accessing the protected member of SPCurve. Nowhere in Inkscape source is the path data changed of SPCurve, except within SPCurve's own methods ! So removed the non-const NArtBpath* get_bpath.
(bzr r5642)
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/curve.cpp | 6 | ||||
| -rw-r--r-- | src/display/curve.h | 1 | ||||
| -rw-r--r-- | src/display/inkscape-cairo.cpp | 2 | ||||
| -rw-r--r-- | src/display/inkscape-cairo.h | 2 | ||||
| -rw-r--r-- | src/display/nr-arena-shape.cpp | 6 |
5 files changed, 9 insertions, 8 deletions
diff --git a/src/display/curve.cpp b/src/display/curve.cpp index 5b2ac024b..489553dac 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -150,11 +150,13 @@ SPCurve::get_bpath() const { return _bpath; }; +/* NArtBpath * SPCurve::get_bpath() { return _bpath; }; +*/ /** * Increase _refcount of curve. @@ -273,7 +275,7 @@ SPCurve::split() const { g_return_val_if_fail(this != NULL, NULL); - gint p = 0; + guint p = 0; GSList *l = NULL; while (p < _end) { @@ -304,7 +306,7 @@ tmpl_curve_transform(SPCurve *const curve, M const &m) { g_return_if_fail(curve != NULL); - for (gint i = 0; i < curve->_end; i++) { + for (guint i = 0; i < curve->_end; i++) { NArtBpath *p = curve->_bpath + i; switch (p->code) { case NR_MOVETO: diff --git a/src/display/curve.h b/src/display/curve.h index 28fce3132..5cd8bb12c 100644 --- a/src/display/curve.h +++ b/src/display/curve.h @@ -36,7 +36,6 @@ public: void set_bpath(NArtBpath * new_bpath); NArtBpath const * get_bpath() const; - NArtBpath * get_bpath(); /// Index in bpath[] of NR_END element. guint _end; diff --git a/src/display/inkscape-cairo.cpp b/src/display/inkscape-cairo.cpp index d2e2b7d8b..15660e587 100644 --- a/src/display/inkscape-cairo.cpp +++ b/src/display/inkscape-cairo.cpp @@ -46,7 +46,7 @@ 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::Maybe<NR::Rect> area, bool optimize_stroke, double stroke_width) +feed_curve_to_cairo (cairo_t *ct, NArtBpath const *bpath, NR::Matrix trans, NR::Maybe<NR::Rect> area, bool optimize_stroke, double stroke_width) { NR::Point next(0,0), last(0,0); if (!area || area->isEmpty()) diff --git a/src/display/inkscape-cairo.h b/src/display/inkscape-cairo.h index fa579fb20..55fa08263 100644 --- a/src/display/inkscape-cairo.h +++ b/src/display/inkscape-cairo.h @@ -11,7 +11,7 @@ */ cairo_t *nr_create_cairo_context (NRRectL *area, NRPixBlock *pb); -void feed_curve_to_cairo (cairo_t *ct, NArtBpath *bpath, NR::Matrix trans, NR::Maybe<NR::Rect> area, bool optimize_stroke, double stroke_width); +void feed_curve_to_cairo (cairo_t *ct, NArtBpath const *bpath, NR::Matrix trans, NR::Maybe<NR::Rect> area, bool optimize_stroke, double stroke_width); #endif /* diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp index aba06068e..0ff7132e1 100644 --- a/src/display/nr-arena-shape.cpp +++ b/src/display/nr-arena-shape.cpp @@ -249,7 +249,7 @@ nr_arena_shape_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, g shape->ctm = gc->transform; if (state & NR_ARENA_ITEM_STATE_BBOX) { if (shape->curve) { - NRBPath bp; + const_NRBPath bp; /* fixme: */ bbox.x0 = bbox.y0 = NR_HUGE; bbox.x1 = bbox.y1 = -NR_HUGE; @@ -277,7 +277,7 @@ nr_arena_shape_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, g bool outline = (NR_ARENA_ITEM(shape)->arena->rendermode == Inkscape::RENDERMODE_OUTLINE); if (shape->curve) { - NRBPath bp; + const_NRBPath bp; /* fixme: */ bbox.x0 = bbox.y0 = NR_HUGE; bbox.x1 = bbox.y1 = -NR_HUGE; @@ -1102,7 +1102,7 @@ nr_arena_shape_pick(NRArenaItem *item, NR::Point p, double delta, unsigned int / width = 0; } - NRBPath bp; + const_NRBPath bp; bp.path = SP_CURVE_BPATH(shape->curve); double dist = NR_HUGE; int wind = 0; |
