From 50b3c18850a43b962ed15855abdb337c846550a8 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 20 Jun 2018 12:34:30 +0200 Subject: Move global functions into SPPrintContext methods. --- src/object/sp-image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/object/sp-image.cpp') 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; } } -- cgit v1.2.3 From ef06ffea25f7d61483b980795321c272af13de04 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 21 Jun 2018 13:15:11 +0200 Subject: Move global functions into SPImage methods. --- src/object/sp-image.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/object/sp-image.cpp') diff --git a/src/object/sp-image.cpp b/src/object/sp-image.cpp index 2b38995df..a5bc115ce 100644 --- a/src/object/sp-image.cpp +++ b/src/object/sp-image.cpp @@ -735,11 +735,11 @@ static void sp_image_set_curve( SPImage *image ) /** * Return duplicate of curve (if any exists) or NULL if there is no curve */ -SPCurve *sp_image_get_curve( SPImage *image ) +SPCurve *SPImage::get_curve() const { SPCurve *result = nullptr; - if (image->curve) { - result = image->curve->copy(); + if (curve) { + result = curve->copy(); } return result; } @@ -841,21 +841,21 @@ void sp_embed_svg(Inkscape::XML::Node *image_node, std::string const &fn) } } -void sp_image_refresh_if_outdated( SPImage* image ) +void SPImage::refresh_if_outdated() { - if ( image->href && image->pixbuf && image->pixbuf->modificationTime()) { + if ( href && pixbuf && pixbuf->modificationTime()) { // It *might* change GStatBuf st; memset(&st, 0, sizeof(st)); int val = 0; - if (g_file_test (image->pixbuf->originalPath().c_str(), G_FILE_TEST_EXISTS)){ - val = g_stat(image->pixbuf->originalPath().c_str(), &st); + if (g_file_test (pixbuf->originalPath().c_str(), G_FILE_TEST_EXISTS)){ + val = g_stat(pixbuf->originalPath().c_str(), &st); } if ( !val ) { // stat call worked. Check time now - if ( st.st_mtime != image->pixbuf->modificationTime() ) { - image->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_IMAGE_HREF_MODIFIED_FLAG); + if ( st.st_mtime != pixbuf->modificationTime() ) { + requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_IMAGE_HREF_MODIFIED_FLAG); } } } -- cgit v1.2.3