Beta version 1.4.4: Fix emoji quality.

This commit is contained in:
John Preston 2018-10-17 14:33:25 +03:00
parent 5e872e4d2d
commit 54f2b1b2d8
2 changed files with 16 additions and 5 deletions

View file

@ -2094,7 +2094,7 @@ bool CheckOldInCurrent() {
const auto category = *c;
for (auto i = begin(*category); i != end(*category); ++i) {
const auto find = [](
std::initializer_list<InputCategory* const> list,
auto &&list,
const InputId &id) {
for (const auto current : list) {
if (std::find(begin(*current), end(*current), id) != end(*current)) {

View file

@ -24,7 +24,7 @@ constexpr auto kUniversalSize = 72;
constexpr auto kImagesPerRow = 32;
constexpr auto kImageRowsPerSprite = 16;
constexpr auto kVersion = 1;
constexpr auto kVersion = 2;
class UniversalImages {
public:
@ -226,10 +226,21 @@ QImage UniversalImages::generate(int size, int index) const {
PainterHighQualityEnabler hq(p);
for (auto y = 0; y != rows; ++y) {
for (auto x = 0; x != kImagesPerRow; ++x) {
const auto single = QImage(
original.bits() + x * large * 4,
large,
large,
original.bytesPerLine(),
original.format()
).scaled(
size,
size,
Qt::IgnoreAspectRatio,
Qt::SmoothTransformation);
p.drawImage(
QRect(x * size, y * size, size, size),
original,
QRect(x * large, y * large, large, large));
x * size,
y * size,
single);
}
}
}