2026年6月22日 :大量更新
This commit is contained in:
@@ -265,6 +265,13 @@ void PicTextItem::setAttrs(const QXmlStreamAttributes &attrs)
|
||||
setCustomFont(fontFamilyRef.toString());
|
||||
}
|
||||
|
||||
qDebug() << "Text item properties: \r\n"
|
||||
<< "\t direction: " << direction()
|
||||
<< "\t boldMultiple: " << boldMultiple()
|
||||
<< "\t colorReversal: " << colorReversal()
|
||||
<< "\t letterSpace: " << letterSpace()
|
||||
<< "\t fontFamily: " << font().family();
|
||||
|
||||
setCustomAttrs(attrs);
|
||||
}
|
||||
|
||||
@@ -427,9 +434,17 @@ void PicTextItem::letterSpaceChanged()
|
||||
|
||||
QImage PicTextItem::strToImage(const QString &str)
|
||||
{
|
||||
if(str.isEmpty())
|
||||
return QImage();
|
||||
|
||||
QPainter painter;
|
||||
QFontMetrics fm(font());
|
||||
QImage img(fm.horizontalAdvance(str), fm.height(), QImage::Format_ARGB32);
|
||||
qDebug() << "strToImage: letterSpace: " << letterSpace();
|
||||
|
||||
if(letterSpace() == 2) {
|
||||
qDebug() << "Break point";
|
||||
}
|
||||
|
||||
QRgb txtColor = colorReversal() ? 0xffffffff : 0xff000000;
|
||||
QRgb bgColor = colorReversal() ? 0xff000000 : 0x00000000;
|
||||
|
||||
Reference in New Issue
Block a user