* @brief Draws an image at (x, y) at its native size. */
| 1374 | * @brief Draws an image at (x, y) at its native size. |
| 1375 | */ |
| 1376 | void Widgets::PainterContext::drawImage(const QString& src, qreal x, qreal y) |
| 1377 | { |
| 1378 | if (!active()) |
| 1379 | return; |
| 1380 | |
| 1381 | const QString resolved = resolveImagePath(src); |
| 1382 | if (resolved.isEmpty()) |
| 1383 | return; |
| 1384 | |
| 1385 | const QImage img(resolved); |
| 1386 | if (img.isNull()) |
| 1387 | return; |
| 1388 | |
| 1389 | m_painter->drawImage(QPointF(x, y), img); |
| 1390 | } |
| 1391 | |
| 1392 | /** |
| 1393 | * @brief Draws an image scaled to (w, h) at (x, y). |
no test coverage detected