QCAD - 2D CAD System.
Click here for a documentation of the DokuWiki formatting syntax that can be used in reports
Please search for existing tasks (also closed ones) before opening a new task.
Please make sure that you are using the latest Version of QCAD before posting a bug (menu Help - Check for Updates)
FS#421 - Multiline Text in SVG Exporter PG
Attached to Project:
QCAD
Opened by Peter (hungerburg) - Wednesday, 07 December 2011, 13:04 GMT+2
Last edited by Andrew (andrew) - Wednesday, 07 December 2011, 16:14 GMT+2
Opened by Peter (hungerburg) - Wednesday, 07 December 2011, 13:04 GMT+2
Last edited by Andrew (andrew) - Wednesday, 07 December 2011, 16:14 GMT+2
|
DetailsMultiline text is in the wrong place. Please see patch below:
— SvgExporterPG.js~ 2011-11-04 22:08:57.000000000 +0100 this.writeStartElement("flowRoot"); // <flowRoot>
this.writeFontAttributes();
var bb = this.text.getBoundingBox();
- var pos = this.text.getPosition(); var x = this.convert(pos.x); var y = this.convert(pos.y); var a = 360 - RMath.rad2deg(this.text.getAngle()); |
This task depends upon
Closed by Andrew (andrew)
Wednesday, 07 December 2011, 16:14 GMT+2
Reason for closing: Fixed
Additional comments about closing: r19941
Wednesday, 07 December 2011, 16:14 GMT+2
Reason for closing: Fixed
Additional comments about closing: r19941
Better readable patch:
--- 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);Thanks.
Here's a refactored and fixed method exportMultiLineText: