| 900 | } |
| 901 | |
| 902 | void 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 | |
| 923 | void Symbol::draw(QPainter* painter, const QVector<QPointF>& points) const { |
| 924 | Q_D(const Symbol); |