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

Method updatePixmap

src/backend/worksheet/plots/cartesian/Histogram.cpp:1529–1548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1527}
1528
1529void HistogramPrivate::updatePixmap() {
1530 m_pixmap = QPixmap(m_boundingRectangle.width(), m_boundingRectangle.height());
1531 if (m_boundingRectangle.width() == 0. || m_boundingRectangle.height() == 0.) {
1532 m_hoverEffectImageIsDirty = true;
1533 m_selectionEffectImageIsDirty = true;
1534 return;
1535 }
1536 m_pixmap.fill(Qt::transparent);
1537 QPainter painter(&m_pixmap);
1538 painter.setRenderHint(QPainter::Antialiasing);
1539 painter.translate(-m_boundingRectangle.topLeft());
1540
1541 draw(&painter);
1542 painter.end();
1543
1544 m_hoverEffectImageIsDirty = true;
1545 m_selectionEffectImageIsDirty = true;
1546 Q_EMIT q->changed();
1547 update();
1548}
1549
1550/*!
1551 Reimplementation of QGraphicsItem::paint(). This function does the actual painting of the curve.

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