Compare commits

..

No commits in common. "cb4919d5bd0b57ea55ad004b2f3daa06a2e41830" and "08d211204e0c7dcac977486faef98e49c75fe5eb" have entirely different histories.

5 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,4 @@
version: 4.1.{build}
version: 4.0.{build}
configuration:
- Release

View File

@ -2,7 +2,7 @@ TARGET = pbf
TEMPLATE = lib
CONFIG += plugin
QT += gui
VERSION = 4.1
VERSION = 4.0
HEADERS += src/pbfhandler.h \
src/data.h \

View File

@ -11,7 +11,7 @@
struct CTX
{
CTX(const QByteArray &ba)
: bp(ba.constData()), be(bp + ba.size()), tag(0) {}
: bp(ba.constData()), be(bp + ba.size()) {}
const char *bp;
const char *be;

View File

@ -6,7 +6,6 @@
#include <QColor>
#include <QPair>
#include <QString>
#include <QJsonValue>
class QJsonObject;

View File

@ -22,7 +22,6 @@ static QImage sdf2img(const QImage &sdf, const QColor &color)
}
Sprites::Sprite::Sprite(const QJsonObject &json)
: _pixelRatio(1.0), _sdf(false)
{
int x, y, width, height;
@ -45,10 +44,16 @@ Sprites::Sprite::Sprite(const QJsonObject &json)
_rect = QRect(x, y, width, height);
if (json.contains("pixelRatio") && json["pixelRatio"].isDouble())
_pixelRatio = json["pixelRatio"].toDouble();
else
_pixelRatio = 1.0;
if (json.contains("sdf") && json["sdf"].isBool())
_sdf = json["sdf"].toBool();
else
_sdf = false;
}
bool Sprites::load(const QString &jsonFile, const QString &imageFile)