[lasem] [Mathml] Correctly scale the output according to the resolution.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: svn-commits-list gnome org
- Subject: [lasem] [Mathml] Correctly scale the output according to the resolution.
- Date: Sat, 16 May 2009 16:32:57 -0400 (EDT)
commit 8cc63bc6c218797258f30f0cfc129a950cd5c9ad
Author: Emmanuel Pacaud <emmanuel pacaud lapp in2p3 fr>
Date: Sat May 16 22:29:09 2009 +0200
[Mathml] Correctly scale the output according to the resolution.
---
src/lsmmathmlview.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/lsmmathmlview.c b/src/lsmmathmlview.c
index d064efa..a1879cd 100644
--- a/src/lsmmathmlview.c
+++ b/src/lsmmathmlview.c
@@ -966,17 +966,22 @@ lsm_mathml_view_render (LsmDomView *dom_view)
LsmMathmlMathElement *math_element;
cairo_t *cairo;
const LsmMathmlBbox *bbox;
+ double resolution_ppi;
math_element = lsm_mathml_document_get_root_element (LSM_MATHML_DOCUMENT (view->dom_view.document));
if (math_element == NULL)
return;
+ resolution_ppi = lsm_dom_document_get_resolution (view->dom_view.document);
+
bbox = _view_measure (view, NULL, NULL);
lsm_mathml_math_element_layout (math_element, view, bbox);
cairo = view->dom_view.cairo;
+ cairo_scale (cairo, resolution_ppi / 72.0, resolution_ppi / 72.0);
+
cairo_translate (cairo, 0, bbox->height);
lsm_mathml_math_element_render (math_element, view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]