mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-15 07:48:29 -04:00
proper rounding of font size
This commit is contained in:
parent
0d0f3e1775
commit
b533ffbde3
@ -291,7 +291,7 @@ public class SvgImporter {
|
|||||||
VectorInterface pos1 = p.add(new VectorFloat(1, 0)).transform(c.getTransform());
|
VectorInterface pos1 = p.add(new VectorFloat(1, 0)).transform(c.getTransform());
|
||||||
|
|
||||||
if (element.getAttribute("id").equals("label"))
|
if (element.getAttribute("id").equals("label"))
|
||||||
csd.setLabel(pos0.round(), pos1.round(), c.getTextOrientation(), (int) c.getFontSize(), c.getFilled());
|
csd.setLabel(pos0.round(), pos1.round(), c.getTextOrientation(), Math.round(c.getFontSize()), c.getFilled());
|
||||||
else
|
else
|
||||||
drawTextElement(csd, c, element, pos0, pos1);
|
drawTextElement(csd, c, element, pos0, pos1);
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ public class SvgImporter {
|
|||||||
NodeList nodes = element.getElementsByTagName("*");
|
NodeList nodes = element.getElementsByTagName("*");
|
||||||
if (nodes.getLength() == 0) {
|
if (nodes.getLength() == 0) {
|
||||||
String text = element.getTextContent();
|
String text = element.getTextContent();
|
||||||
csd.addText(pos0.round(), pos1.round(), text, c.getTextOrientation(), (int) c.getFontSize(), c.getFilled());
|
csd.addText(pos0.round(), pos1.round(), text, c.getTextOrientation(), Math.round(c.getFontSize()), c.getFilled());
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < nodes.getLength(); i++) {
|
for (int i = 0; i < nodes.getLength(); i++) {
|
||||||
Node n = nodes.item(i);
|
Node n = nodes.item(i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user