diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-20 10:34:30 +0000 |
|---|---|---|
| committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-21 11:02:56 +0000 |
| commit | 50b3c18850a43b962ed15855abdb337c846550a8 (patch) | |
| tree | 147a86fc1d123f44bfd9927448ab2ecf4bfd1bdc /src/object | |
| parent | Merge branch 'select-page' of gitlab.com:bobqwatson/inkscape (diff) | |
| download | inkscape-50b3c18850a43b962ed15855abdb337c846550a8.tar.gz inkscape-50b3c18850a43b962ed15855abdb337c846550a8.zip | |
Move global functions into SPPrintContext methods.
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/sp-image.cpp | 2 | ||||
| -rw-r--r-- | src/object/sp-item.cpp | 4 | ||||
| -rw-r--r-- | src/object/sp-root.cpp | 4 | ||||
| -rw-r--r-- | src/object/sp-shape.cpp | 8 | ||||
| -rw-r--r-- | src/object/sp-symbol.cpp | 4 | ||||
| -rw-r--r-- | src/object/sp-use.cpp | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/src/object/sp-image.cpp b/src/object/sp-image.cpp index cdbe0ef4a..2b38995df 100644 --- a/src/object/sp-image.cpp +++ b/src/object/sp-image.cpp @@ -479,7 +479,7 @@ void SPImage::print(SPPrintContext *ctx) { Geom::Translate tp(vx, vy); Geom::Scale s(this->sx, this->sy); t = s * tp; - sp_print_image_R8G8B8A8_N(ctx, px, w, h, rs, t, this->style); + ctx->image_R8G8B8A8_N(px, w, h, rs, t, this->style); delete pb; } } diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp index 286886a1a..ec92c655f 100644 --- a/src/object/sp-item.cpp +++ b/src/object/sp-item.cpp @@ -1023,9 +1023,9 @@ void SPItem::invoke_print(SPPrintContext *ctx) { if ( !isHidden() ) { if (!transform.isIdentity() || style->opacity.value != SP_SCALE24_MAX) { - sp_print_bind(ctx, transform, SP_SCALE24_TO_FLOAT(style->opacity.value)); + ctx->bind(transform, SP_SCALE24_TO_FLOAT(style->opacity.value)); this->print(ctx); - sp_print_release(ctx); + ctx->release(); } else { this->print(ctx); } diff --git a/src/object/sp-root.cpp b/src/object/sp-root.cpp index 592aae443..6ebccef3c 100644 --- a/src/object/sp-root.cpp +++ b/src/object/sp-root.cpp @@ -369,11 +369,11 @@ Inkscape::DrawingItem *SPRoot::show(Inkscape::Drawing &drawing, unsigned int key void SPRoot::print(SPPrintContext *ctx) { - sp_print_bind(ctx, this->c2p, 1.0); + ctx->bind(this->c2p, 1.0); SPGroup::print(ctx); - sp_print_release(ctx); + ctx->release(); } const char *SPRoot::displayName() const { diff --git a/src/object/sp-shape.cpp b/src/object/sp-shape.cpp index 1f4572428..d3fce702e 100644 --- a/src/object/sp-shape.cpp +++ b/src/object/sp-shape.cpp @@ -641,7 +641,7 @@ void SPShape::print(SPPrintContext* ctx) { if (add_comments) { gchar * comment = g_strdup_printf("begin '%s'", this->defaultLabel()); - sp_print_comment(ctx, comment); + ctx->comment(comment); g_free(comment); } @@ -656,11 +656,11 @@ void SPShape::print(SPPrintContext* ctx) { SPStyle* style = this->style; if (!style->fill.isNone()) { - sp_print_fill (ctx, pathv, i2dt, style, pbox, dbox, bbox); + ctx->fill (pathv, i2dt, style, pbox, dbox, bbox); } if (!style->stroke.isNone()) { - sp_print_stroke (ctx, pathv, i2dt, style, pbox, dbox, bbox); + ctx->stroke (pathv, i2dt, style, pbox, dbox, bbox); } /** \todo make code prettier */ @@ -737,7 +737,7 @@ void SPShape::print(SPPrintContext* ctx) { if (add_comments) { gchar * comment = g_strdup_printf("end '%s'", this->defaultLabel()); - sp_print_comment(ctx, comment); + ctx->comment(comment); g_free(comment); } } diff --git a/src/object/sp-symbol.cpp b/src/object/sp-symbol.cpp index d3a06a60b..feb3ed097 100644 --- a/src/object/sp-symbol.cpp +++ b/src/object/sp-symbol.cpp @@ -148,11 +148,11 @@ void SPSymbol::print(SPPrintContext* ctx) { if (this->cloned) { // Cloned <symbol> is actually renderable - sp_print_bind(ctx, this->c2p, 1.0); + ctx->bind(this->c2p, 1.0); SPGroup::print(ctx); - sp_print_release (ctx); + ctx->release (); } } diff --git a/src/object/sp-use.cpp b/src/object/sp-use.cpp index 6ee4be4b2..a73a731f8 100644 --- a/src/object/sp-use.cpp +++ b/src/object/sp-use.cpp @@ -216,7 +216,7 @@ void SPUse::print(SPPrintContext* ctx) { if ((this->x._set && this->x.computed != 0) || (this->y._set && this->y.computed != 0)) { Geom::Affine tp(Geom::Translate(this->x.computed, this->y.computed)); - sp_print_bind(ctx, tp, 1.0); + ctx->bind(tp, 1.0); translated = true; } @@ -225,7 +225,7 @@ void SPUse::print(SPPrintContext* ctx) { } if (translated) { - sp_print_release(ctx); + ctx->release(); } } |
