← All bug reports

FS#299Text of rotated dimensions in SVG PG export

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3 Beta 2
Operating system
All
Reported
2011-10-07 by hungerburg
Closed
2011-10-07 by andrew

Sometimes the text of a dimension (that is in a block - just a suspicion of mine) will not get rotated. I do not know why this.text.getAngle() sometimes returns a wrong value, but there is a simple workaround: always rotate the text with the dimension:

--- SvgExporterPG-orig.js	2011-09-15 23:11:40.000000000 +0200
+++ SvgExporterPG.js	2011-10-07 13:07:03.715374911 +0200

@@ -428,9 +427,7 @@
         // dimension entity: export text:
         this.writeEntityComment(entity);
         this.text = entity.getTextData();
-//        var angle = this.text.getAngle();
-//        var offset = RVector.createPolar(this.text.getHeight()/2, angle + Math.PI/2);
-//        this.text.move(offset);
+        this.text.setAngle(entity.getAngle());
         this.textColor = entity.getColor();
         this.exportText();
         this.text = undefined;

Comments (1)

andrew 2011-10-07

Thanks. I was able to fix this in another place.