[dia] diasvg.py : viewBox is <min-x>, <min-y>, <width> and <height>



commit e6397b3b740081a91ebd6f6b6fc717eda8d79d63
Author: Hans Breuer <hans breuer org>
Date:   Sun Jan 30 19:18:22 2011 +0100

    diasvg.py : viewBox is <min-x>, <min-y>, <width> and <height>
    
    not upper and lower corner. Thanks to Max Wahler reminding me.

 plug-ins/python/diasvg.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/python/diasvg.py b/plug-ins/python/diasvg.py
index 23a8dc6..0701fde 100644
--- a/plug-ins/python/diasvg.py
+++ b/plug-ins/python/diasvg.py
@@ -40,7 +40,7 @@ class SvgRenderer :
 <svg width="%.3fcm" height="%.3fcm" viewBox="%.3f %.3f %.3f %.3f"
  xmlns="http://www.w3.org/2000/svg";
  xmlns:xlink="http://www.w3.org/1999/xlink";>
-''' % (r.right - r.left, r.bottom - r.top, r[0], r[1], r[2], r[3]))
+''' % (r.right - r.left, r.bottom - r.top, r[0], r[1], r[2] - r[0], r[3] - r[1]))
 		#self.f.write("<!-- %s -->\n" % (str(data.extents)))
 		#self.f.write("<!-- %s -->\n" % (data.active_layer.name))
 	def end_render (self) :



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]