Comments: DXF, honours, "Uses the same width as"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-10-09 21:52:10 +13:00
parent 3b0824c3ef
commit 449ba6eff0
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -457,8 +457,8 @@ void PartText::finishAlignment()
@return the vector from the baseline-left of the text to the point
written as x/y with anchor="alignment" (#1251): the left edge, centre or
right edge of the text, without the document margin, on the baseline.
Same width as ElementPictureFactory::parseText, which draws without
a margin.
Uses the same width as ElementPictureFactory::parseText, which draws
without a margin.
*/
QPointF PartText::anchorOffset() const
{
+2 -2
View File
@@ -705,7 +705,7 @@ void ElementPictureFactory::parseText(const QDomElement &dom, QPainter &painter,
text_document.setDocumentMargin(0.0);
//Optional line alignment of multi-line texts. The document only
//honors the text option once a text width is set.
//honours the text option once a text width is set.
//x/y are the baseline-left of the text block, unless
//anchor="alignment": x is then the left edge, centre or right edge
//selected by Halignment, and y stays the baseline (#1251).
@@ -728,7 +728,7 @@ void ElementPictureFactory::parseText(const QDomElement &dom, QPainter &painter,
QTransform text_transform;
text_transform.translate(dom.attribute("x").toDouble(), dom.attribute("y").toDouble());
text_transform.rotate(dom.attribute("rotation", "0").toDouble());
//baseline-left of the text block, for the dxf export below
//baseline-left of the text block, for the DXF export below
const QPointF baseline_left = text_transform.map(QPointF(qpainter_offset.x(), 0));
text_transform.translate(qpainter_offset.x(), qpainter_offset.y());