242,39 → 242,6 |
} |
} |
|
static void debugLineLayout(const StoryText& itemText, const LineSpec& line) |
{ |
QFile debugFile(QDir::homePath() + "/Desktop/debug_line.csv"); |
debugFile.open(QIODevice::WriteOnly); |
|
QTextStream stream(&debugFile); |
stream.setRealNumberNotation(QTextStream::FixedNotation); |
stream.setRealNumberPrecision(7); |
|
stream << "xoffset" << "\t"; |
stream << "yoffset" << "\t"; |
stream << "xadvance" << "\t"; |
stream << "yadvance" << "\t"; |
stream << "scaleH" << "\t"; |
stream << "scaleV" << "\t"; |
stream << "\n"; |
|
for (int zc = line.firstItem; zc < line.lastItem; ++zc) |
{ |
const ScText* item = itemText.item(zc); |
|
stream << item->glyph.xoffset << "\t"; |
stream << item->glyph.yoffset << "\t"; |
stream << item->glyph.xadvance << "\t"; |
stream << item->glyph.yadvance << "\t"; |
stream << item->glyph.scaleH << "\t"; |
stream << item->glyph.scaleV << "\t"; |
stream << "\n"; |
} |
|
debugFile.close(); |
} |
|
static void dumpIt(const ParagraphStyle& pstyle, QString indent = QString("->")) |
{ |
QString db = QString("%6%1/%2 @ %3: %4--%5 linespa%6: %7 align%8") |
2497,13 → 2464,14 |
} |
MaxChars = itemText.length(); |
invalid = false; |
|
PageItem_TextFrame* nextFrame = dynamic_cast<PageItem_TextFrame*>(NextBox); |
while (nextFrame != NULL) |
if (NextBox != NULL) |
{ |
nextFrame->invalid = true; |
nextFrame->firstChar = MaxChars; |
nextFrame = dynamic_cast<PageItem_TextFrame*>(nextFrame->NextBox); |
PageItem_TextFrame* nextFrame = dynamic_cast<PageItem_TextFrame*>(NextBox); |
if (nextFrame != NULL) |
{ |
nextFrame->invalid = true; |
nextFrame->firstChar = MaxChars; |
} |
} |
// qDebug("textframe: len=%d, done relayout", itemText.length()); |
return; |