From 63203fb881bfce667a14b2bbb3ec2ee40a9adf77 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sat, 27 Jul 2019 14:40:29 +0000 Subject: Make doc2dt a document property Closes #340 --- src/helper/png-write.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/helper/png-write.cpp') diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp index 5fedc08ec..1f2150cf1 100644 --- a/src/helper/png-write.cpp +++ b/src/helper/png-write.cpp @@ -429,13 +429,8 @@ ExportResult sp_export_png_file(SPDocument *doc, gchar const *filename, doc->ensureUpToDate(); - Geom::Affine dt2doc; - if (SP_ACTIVE_DESKTOP) { - dt2doc = SP_ACTIVE_DESKTOP->dt2doc(); - } - /* Calculate translation by transforming to document coordinates (flipping Y)*/ - Geom::Point translation = -(area * dt2doc).min(); + Geom::Point translation = -(area * doc->dt2doc()).min(); /* This calculation is only valid when assumed that (x0,y0)= area.corner(0) and (x1,y1) = area.corner(2) * 1) a[0] * x0 + a[2] * y1 + a[4] = 0.0 -- cgit v1.2.3