mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2025-07-22 06:44:25 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
ee4c0120a2 | |||
6f4f25afa3 | |||
d32da083d6 |
@ -1,4 +1,4 @@
|
||||
version: 4.3.{build}
|
||||
version: 4.4.{build}
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
@ -2,7 +2,7 @@ TARGET = pbf
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
QT += gui
|
||||
VERSION = 4.3
|
||||
VERSION = 4.4
|
||||
|
||||
HEADERS += src/pbfhandler.h \
|
||||
src/data.h \
|
||||
|
@ -123,8 +123,15 @@ QImage Sprites::sprite(const Sprite &sprite, const QColor &color, qreal scale)
|
||||
return sdf2img(simg, color);
|
||||
} else
|
||||
return sdf2img(img, color);
|
||||
} else
|
||||
return img;
|
||||
} else {
|
||||
if (scale != 1.0) {
|
||||
QSize size(img.size().width() * scale, img.size().height() * scale);
|
||||
QImage simg(img.scaled(size, Qt::IgnoreAspectRatio,
|
||||
Qt::SmoothTransformation));
|
||||
return simg;
|
||||
} else
|
||||
return img;
|
||||
}
|
||||
}
|
||||
|
||||
QImage Sprites::icon(const QString &name, const QColor &color, qreal size)
|
||||
|
@ -415,9 +415,10 @@ Text::Anchor Style::Layer::Layout::textAnchor(int zoom) const
|
||||
{
|
||||
QString anchor(_textAnchor.value(zoom));
|
||||
|
||||
if (anchor == "left")
|
||||
if (anchor == "left" || anchor == "top-left" || anchor == "bottom-left")
|
||||
return Text::Left;
|
||||
else if (anchor == "right")
|
||||
else if (anchor == "right" || anchor == "top-right"
|
||||
|| anchor == "bottom-right")
|
||||
return Text::Right;
|
||||
else if (anchor == "top")
|
||||
return Text::Top;
|
||||
|
@ -91,8 +91,8 @@ private:
|
||||
|
||||
class Layout {
|
||||
public:
|
||||
Layout() : _textSize(16), _textMaxWidth(10), _textMaxAngle(45),
|
||||
_font("Open Sans"), _visible(true) {}
|
||||
Layout() : _iconSize(1.0), _textSize(16), _textMaxWidth(10),
|
||||
_textMaxAngle(45), _font("Open Sans"), _visible(true) {}
|
||||
Layout(const QJsonObject &json);
|
||||
|
||||
qreal maxTextWidth(int zoom) const
|
||||
|
Reference in New Issue
Block a user