MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / paint

Method paint

ASAP/annotation/DotQtAnnotation.cpp:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void DotQtAnnotation::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
44 QWidget *widget) {
45 _currentLOD = option->levelOfDetailFromTransform(painter->worldTransform());
46 painter->setPen(Qt::NoPen);
47 if (isSelected()) {
48 painter->setBrush(QBrush(_rectSelectedColor));
49 }
50 else {
51 painter->setBrush(QBrush(getDrawingColor()));
52 }
53 if (isSelected()) {
54 painter->drawEllipse(QPointF(), 1.5 * _rectSize / _currentLOD, 1.5 * _rectSize / _currentLOD);
55 }
56 else {
57 painter->drawEllipse(QPointF(), _rectSize / _currentLOD, _rectSize / _currentLOD);
58 }
59}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected