132 cropped->pm->fill(Qt::transparent);
138 p.setRenderHint(QPainter::SmoothPixmapTransform);
140 p.setRenderHint(QPainter::Antialiasing);
145 int mw =
mask->
pm->width();
151 p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
152 p.setRenderHint(QPainter::Antialiasing);
153 p.setRenderHint(QPainter::SmoothPixmapTransform);
205 if (
gui()->map_scale != 1.0f &&
gui()->map_font_scale) {
208 if (
qf->pointSize() !=
ssize) {
216 ns = QString::number(num);
224 u8"\0xF0\0x9F\0x84\0x8C",
251 w =
fm.horizontalAdvance(
ns);
254 pm->fill(Qt::transparent);
259 paint.setBrush(Qt::transparent);
260 paint.setPen(
QColor(Qt::black));
261 paint.drawText(
QRect(0, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
265 paint.setPen(
QColor(Qt::yellow));
266 paint.drawText(
QRect(-2, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
268 paint.drawText(
QRect(4, -2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
270 paint.drawText(
QRect(4, 2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
272 paint.drawText(
QRect(8, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
279 w =
fm.horizontalAdvance(
ns);
282 pm->fill(Qt::transparent);
287 paint.setBrush(Qt::transparent);
288 paint.setPen(
QColor(Qt::black));
289 paint.drawText(
QRect(0, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
293 paint.setPen(
QColor(Qt::yellow));
294 paint.drawText(
QRect(-2, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
296 paint.drawText(
QRect(4, -2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
298 paint.drawText(
QRect(4, 2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
300 paint.drawText(
QRect(8, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
306 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)