mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-09 21:54:13 +02:00
Comments: DXF, honours, "Uses the same width as"
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user