Changeset View
Changeset View
Standalone View
Standalone View
lib/imagescaler.cpp
Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Line(s) | 107 | { | |||
---|---|---|---|---|---|
124 | LOG("Done"); | 124 | LOG("Done"); | ||
125 | } | 125 | } | ||
126 | 126 | | |||
127 | void ImageScaler::scaleRect(const QRect& rect) | 127 | void ImageScaler::scaleRect(const QRect& rect) | ||
128 | { | 128 | { | ||
129 | const qreal REAL_DELTA = 0.001; | 129 | const qreal REAL_DELTA = 0.001; | ||
130 | if (qAbs(d->mZoom - 1.0) < REAL_DELTA) { | 130 | if (qAbs(d->mZoom - 1.0) < REAL_DELTA) { | ||
131 | QImage tmp = d->mDocument->image().copy(rect); | 131 | QImage tmp = d->mDocument->image().copy(rect); | ||
132 | scaledRect(rect.left(), rect.top(), tmp); | 132 | emit scaledRect(rect.left(), rect.top(), tmp); | ||
133 | return; | 133 | return; | ||
134 | } | 134 | } | ||
135 | 135 | | |||
136 | QImage image; | 136 | QImage image; | ||
137 | qreal zoom; | 137 | qreal zoom; | ||
138 | if (d->mZoom < Document::maxDownSampledZoom()) { | 138 | if (d->mZoom < Document::maxDownSampledZoom()) { | ||
139 | image = d->mDocument->downSampledImageForZoom(d->mZoom); | 139 | image = d->mDocument->downSampledImageForZoom(d->mZoom); | ||
140 | Q_ASSERT(!image.isNull()); | 140 | Q_ASSERT(!image.isNull()); | ||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |