From 31b9a88edb6a5f86bdb1c13ac693ecd90f6b9999 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Mon, 14 Aug 2023 16:09:09 -0700 Subject: [PATCH] Add text --- dyesub-tool/src/svg/measure.rs | 4 ++-- dyesub-tool/templates/document.xml | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dyesub-tool/src/svg/measure.rs b/dyesub-tool/src/svg/measure.rs index fd59c9f..092c2a6 100644 --- a/dyesub-tool/src/svg/measure.rs +++ b/dyesub-tool/src/svg/measure.rs @@ -23,11 +23,11 @@ impl SVGMeasure { Self { measure, unit } } - fn to_user_units(self) -> f64 { + pub fn to_user_units(self) -> f64 { self.measure * self.unit.to_user_units() } - fn to_unit(self, unit: SVGUnit) -> Self { + pub fn to_unit(self, unit: SVGUnit) -> Self { SVGMeasure { measure: self.to_user_units() / unit.to_user_units(), unit, diff --git a/dyesub-tool/templates/document.xml b/dyesub-tool/templates/document.xml index 7804fe5..de05c53 100644 --- a/dyesub-tool/templates/document.xml +++ b/dyesub-tool/templates/document.xml @@ -1,7 +1,13 @@ + + + {% for (x, y) in positions %} - + + + + {% endfor %}