MCPcopy Create free account
hub / github.com/KDE/labplot / updatePixmap

Method updatePixmap

src/backend/worksheet/plots/cartesian/BoxPlot.cpp:1568–1588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1566}
1567
1568void BoxPlotPrivate::updatePixmap() {
1569 PERFTRACE(name() + QLatin1String(Q_FUNC_INFO));
1570 m_pixmap = QPixmap(m_boundingRectangle.width(), m_boundingRectangle.height());
1571 if (m_boundingRectangle.width() == 0. || m_boundingRectangle.height() == 0.) {
1572 m_hoverEffectImageIsDirty = true;
1573 m_selectionEffectImageIsDirty = true;
1574 return;
1575 }
1576 m_pixmap.fill(Qt::transparent);
1577 QPainter painter(&m_pixmap);
1578 painter.setRenderHint(QPainter::Antialiasing);
1579 painter.translate(-m_boundingRectangle.topLeft());
1580
1581 draw(&painter);
1582 painter.end();
1583
1584 m_hoverEffectImageIsDirty = true;
1585 m_selectionEffectImageIsDirty = true;
1586 Q_EMIT q->changed();
1587 update();
1588}
1589
1590void BoxPlotPrivate::draw(QPainter* painter) {
1591 PERFTRACE(name() + QLatin1String(Q_FUNC_INFO));

Callers 1

initMethod · 0.45

Calls 5

heightMethod · 0.80
QPixmapClass · 0.50
widthMethod · 0.45
translateMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected