Changeset View
Changeset View
Standalone View
Standalone View
ui/pagepainter.cpp
Show First 20 Lines • Show All 674 Lines • ▼ Show 20 Line(s) | 591 | { | |||
---|---|---|---|---|---|
675 | 675 | | |||
676 | } | 676 | } | ||
677 | // draw StampAnnotation | 677 | // draw StampAnnotation | ||
678 | else if ( type == Okular::Annotation::AStamp ) | 678 | else if ( type == Okular::Annotation::AStamp ) | ||
679 | { | 679 | { | ||
680 | Okular::StampAnnotation * stamp = (Okular::StampAnnotation *)a; | 680 | Okular::StampAnnotation * stamp = (Okular::StampAnnotation *)a; | ||
681 | 681 | | |||
682 | // get pixmap and alpha blend it if needed | 682 | // get pixmap and alpha blend it if needed | ||
683 | QPixmap pixmap = GuiUtils::loadStamp( stamp->stampIconName(), annotBoundary.size() ); | 683 | QPixmap pixmap = GuiUtils::loadStamp( stamp->stampIconName(), annotBoundary.width() ); | ||
684 | if ( !pixmap.isNull() ) // should never happen but can happen on huge sizes | 684 | if ( !pixmap.isNull() ) // should never happen but can happen on huge sizes | ||
685 | { | 685 | { | ||
686 | const QRect dInnerRect(QRectF(innerRect.x() * dpr, innerRect.y() * dpr, innerRect.width() * dpr, innerRect.height() * dpr).toAlignedRect()); | 686 | const QRect dInnerRect(QRectF(innerRect.x() * dpr, innerRect.y() * dpr, innerRect.width() * dpr, innerRect.height() * dpr).toAlignedRect()); | ||
687 | 687 | | |||
688 | QPixmap scaledCroppedPixmap = pixmap.scaled(annotBoundary.width() * dpr, annotBoundary.height() * dpr).copy(dInnerRect); | 688 | QPixmap scaledCroppedPixmap = pixmap.scaled(annotBoundary.width() * dpr, annotBoundary.height() * dpr).copy(dInnerRect); | ||
689 | scaledCroppedPixmap.setDevicePixelRatio(dpr); | 689 | scaledCroppedPixmap.setDevicePixelRatio(dpr); | ||
690 | 690 | | |||
691 | QImage scaledCroppedImage = scaledCroppedPixmap.toImage(); | 691 | QImage scaledCroppedImage = scaledCroppedPixmap.toImage(); | ||
▲ Show 20 Lines • Show All 538 Lines • Show Last 20 Lines |