diff options
author | Treeki <treeki@gmail.com> | 2012-09-12 14:57:44 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-12 14:57:44 +0200 |
commit | 3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10 (patch) | |
tree | d10e8cd4e462db28dd3c2f995905c4df57a20fed /lyt/textbox.cpp | |
parent | be8b56a7f0a8f6ba5456a099b61d032fd8aa2f61 (diff) | |
download | LayoutStudio-3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10.tar.gz LayoutStudio-3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10.zip |
initial un-exporter version
Diffstat (limited to 'lyt/textbox.cpp')
-rw-r--r-- | lyt/textbox.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lyt/textbox.cpp b/lyt/textbox.cpp index e943963..c845618 100644 --- a/lyt/textbox.cpp +++ b/lyt/textbox.cpp @@ -39,7 +39,7 @@ void LYTTextBox::dumpToDebug(bool showHeading) const { qDebug() << "- Text:" << text; qDebug() << "- Buffer Length:" << bufferLength; qDebug() << "- Material:" << materialName << "- Font:" << fontName; - qDebug() << "- Alignment:" << alignment << "- Alignment Override:" << alignmentOverride; + //qDebug() << "- Alignment:" << alignment << "- Alignment Override:" << alignmentOverride; qDebug() << "- Colours:" << colour1 << "--" << colour2; qDebug() << "- Font Size:" << fontSizeX << "x" << fontSizeY; qDebug() << "- Char Space:" << charSpace << "- Line Space:" << lineSpace; @@ -61,8 +61,8 @@ void LYTTextBox::writeToDataStream(QDataStream &out) const { out << (quint16)materialNum; out << (quint16)fontNum; - out << (quint8)alignment; - out << (quint8)alignmentOverride; + out << (quint8)(((int)textHorzPos) + (((int)textVertPos) * 3)); + out << (quint8)alignment; WritePadding(2, out); @@ -110,8 +110,11 @@ void LYTTextBox::readFromDataStream(QDataStream &in) { materialName = m_layout.materials.getNameOfIndex(materialNum); fontName = m_layout.m_fontRefs.at(fontNum); - in >> (quint8&)alignment; - in >> (quint8&)alignmentOverride; + quint8 whatpos; + in >> (quint8&)whatpos; + textHorzPos = (OriginType)(whatpos % 3); + textVertPos = (OriginType)(whatpos / 3); + in >> (quint8&)alignment; in.skipRawData(2); // padding |