FS#421Multiline Text in SVG Exporter PG
- Type
- Bug
- Status
- Closed
- Resolution
- Fixed
- Category
- QCAD (main)
- Severity
- Low
- Priority
- Low
- Reported version
- 3 RC2
- Operating system
- All
- Reported
- 2011-12-07 by hungerburg
- Closed
- 2011-12-07 by andrew
Multiline text is in the wrong place. Please see patch below:
--- SvgExporterPG.js~ 2011-11-04 22:08:57.000000000 +0100
+++ SvgExporterPG.js 2011-12-07 13:01:43.811533803 +0100
@@ -248,7 +248,8 @@
this.writeStartElement("flowRoot"); // <flowRoot>
this.writeFontAttributes();
var bb = this.text.getBoundingBox();
- var pos = this.text.getPosition();
+ //var pos = this.text.getPosition(); // always (0,0) ?
+ var pos = bb.getCenter(); // still not right, but closer
var x = this.convert(pos.x);
var y = this.convert(pos.y);
var a = 360 - RMath.rad2deg(this.text.getAngle());
Closure comment
r19941
Comments (2)
Better readable patch:
Thanks.
Here's a refactored and fixed method exportMultiLineText: