summaryrefslogtreecommitdiff
path: root/lyt/textbox.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-12 14:57:44 +0200
committerTreeki <treeki@gmail.com>2012-09-12 14:57:44 +0200
commit3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10 (patch)
treed10e8cd4e462db28dd3c2f995905c4df57a20fed /lyt/textbox.cpp
parentbe8b56a7f0a8f6ba5456a099b61d032fd8aa2f61 (diff)
downloadLayoutStudio-3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10.tar.gz
LayoutStudio-3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10.zip
initial un-exporter version
Diffstat (limited to '')
-rw-r--r--lyt/textbox.cpp13
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