add MapItemBase::renderHints
This commit is contained in:
@@ -320,8 +320,7 @@ void MapView::drawBackground() {
|
||||
|
||||
void MapView::drawItems(QPainter & p) {
|
||||
auto src_tr = p.transform();
|
||||
p.setRenderHint(QPainter::Antialiasing);
|
||||
p.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
QPainter::RenderHints cur_hints;
|
||||
QPoint mouse = mapFromGlobal(QCursor::pos());
|
||||
MapItemBase * hover = nullptr;
|
||||
for (auto * i: items_) {
|
||||
@@ -332,6 +331,10 @@ void MapView::drawItems(QPainter & p) {
|
||||
p.translate(i->m_offset.x(), -i->m_offset.y());
|
||||
p.rotate(i->getRotation());
|
||||
if (!i->ignore_scale) p.scale(i->getScale().x(), i->getScale().y());
|
||||
if (cur_hints != i->renderHints()) {
|
||||
cur_hints = i->renderHints();
|
||||
p.setRenderHints(cur_hints);
|
||||
}
|
||||
i->draw(&p);
|
||||
QTransform mtr;
|
||||
mtr.rotate(-i->getRotation());
|
||||
|
||||
Reference in New Issue
Block a user