131 cropped->pm->fill(Qt::transparent);
137 p.setRenderHint(QPainter::SmoothPixmapTransform);
139 p.setRenderHint(QPainter::Antialiasing);
144 int mw =
mask->
pm->width();
150 p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
151 p.setRenderHint(QPainter::Antialiasing);
152 p.setRenderHint(QPainter::SmoothPixmapTransform);
204 if (
gui()->map_scale != 1.0f &&
gui()->map_font_scale) {
207 if (
qf->pointSize() !=
ssize) {
215 ns = QString::number(num);
223 u8"\0xF0\0x9F\0x84\0x8C",
250 w =
fm.horizontalAdvance(
ns);
253 pm->fill(Qt::transparent);
258 paint.setBrush(Qt::transparent);
259 paint.setPen(
QColor(Qt::black));
260 paint.drawText(
QRect(0, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
264 paint.setPen(
QColor(Qt::yellow));
265 paint.drawText(
QRect(-2, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
267 paint.drawText(
QRect(4, -2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
269 paint.drawText(
QRect(4, 2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
271 paint.drawText(
QRect(8, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
278 w =
fm.horizontalAdvance(
ns);
281 pm->fill(Qt::transparent);
286 paint.setBrush(Qt::transparent);
287 paint.setPen(
QColor(Qt::black));
288 paint.drawText(
QRect(0, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
292 paint.setPen(
QColor(Qt::yellow));
293 paint.drawText(
QRect(-2, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
295 paint.drawText(
QRect(4, -2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
297 paint.drawText(
QRect(4, 2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
299 paint.drawText(
QRect(8, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
305 paint.drawText(
QRect(0, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
ns);
struct sprite * qtg_crop_sprite(struct sprite *source, int x, int y, int width, int height, struct sprite *mask, int mask_offset_x, int mask_offset_y, float scale, bool smooth)