path in PDF coordinates
| 317 | |
| 318 | // path in PDF coordinates |
| 319 | QGraphicsPathItem * PDFDocumentView::addHighlightPath(const size_type page, const QPainterPath & path, const QBrush & brush, const QPen & pen /* = Qt::NoPen */) |
| 320 | { |
| 321 | if (!_pdf_scene) |
| 322 | return nullptr; |
| 323 | |
| 324 | PDFPageGraphicsItem * pageItem = dynamic_cast<PDFPageGraphicsItem*>(_pdf_scene->pageAt(static_cast<int>(page))); |
| 325 | if (!pageItem || !PDFDocumentScene::isPageItem(pageItem)) |
| 326 | return nullptr; |
| 327 | |
| 328 | QGraphicsPathItem * highlightItem = new QGraphicsPathItem(path, pageItem); |
| 329 | highlightItem->setBrush(brush); |
| 330 | highlightItem->setPen(pen); |
| 331 | highlightItem->setTransform(pageItem->pointScale()); |
| 332 | return highlightItem; |
| 333 | } |
| 334 | |
| 335 | void PDFDocumentView::fitInView(const QRectF & rect, Qt::AspectRatioMode aspectRatioMode /* = Qt::IgnoreAspectRatio */) |
| 336 | { |
no test coverage detected