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

Method draw

src/backend/worksheet/plots/cartesian/Symbol.cpp:902–921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900}
901
902void Symbol::draw(QPainter* painter, QPointF point) const {
903 Q_D(const Symbol);
904 if (d->style == Symbol::Style::NoSymbols)
905 return;
906
907 painter->setOpacity(d->opacity);
908 painter->setPen(d->pen);
909 painter->setBrush(d->brush);
910 QTransform trafo;
911 trafo.scale(d->size, d->size);
912 QPainterPath path = Symbol::stylePath(d->style);
913 if (d->rotationAngle != 0)
914 trafo.rotate(-d->rotationAngle);
915
916 path = trafo.map(path);
917
918 trafo.reset();
919 trafo.translate(point.x(), point.y());
920 painter->drawPath(trafo.map(path));
921}
922
923void Symbol::draw(QPainter* painter, const QVector<QPointF>& points) const {
924 Q_D(const Symbol);

Callers

nothing calls this directly

Calls 10

setPenMethod · 0.80
setBrushMethod · 0.80
xMethod · 0.80
setOpacityMethod · 0.45
scaleMethod · 0.45
mapMethod · 0.45
resetMethod · 0.45
translateMethod · 0.45
yMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected