summaryrefslogtreecommitdiffstats
path: root/src/object/sp-image.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2018-06-21 18:18:15 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2018-06-21 18:18:15 +0000
commit74c2ed472c8e5b7070e9702fcf749bb19dadac99 (patch)
treefd617c1a35ab8f2b8add246f95ef00eac857f0b2 /src/object/sp-image.cpp
parentMerge branch 'transf_mat_3x4' of gitlab.com:linkmauve/inkscape (diff)
parentMove global functions into SPImage methods. (diff)
downloadinkscape-74c2ed472c8e5b7070e9702fcf749bb19dadac99.tar.gz
inkscape-74c2ed472c8e5b7070e9702fcf749bb19dadac99.zip
Merge branch 'sp_print' of gitlab.com:linkmauve/inkscape
Diffstat (limited to 'src/object/sp-image.cpp')
-rw-r--r--src/object/sp-image.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/object/sp-image.cpp b/src/object/sp-image.cpp
index cdbe0ef4a..a5bc115ce 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;
}
}
@@ -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);
}
}
}