| 22 | } |
| 23 | |
| 24 | void Annotation1DTextItem::draw(Plot1DCanvas* const canvas, QPainter& painter, bool flipped) |
| 25 | { |
| 26 | // translate units to pixel coordinates |
| 27 | QPoint pos_text; |
| 28 | canvas->dataToWidget(position_, pos_text, flipped); |
| 29 | |
| 30 | // compute bounding box of text_item on the specified painter |
| 31 | bounding_box_ = painter.boundingRect(QRectF(pos_text, pos_text), flags_, text_); |
| 32 | |
| 33 | painter.drawText(bounding_box_, flags_, text_); |
| 34 | if (selected_) |
| 35 | { |
| 36 | drawBoundingBox_(painter); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | void Annotation1DTextItem::move(const PointXYType delta, const Gravitator& /*gr*/, const DimMapper<2>& /*dim_mapper*/) |
| 41 | { |
no test coverage detected