162 QPointF pos, qreal subPixelX, qreal subPixelY,
int dabX,
int dabY)
174 if (dab->
bounds().width() != dstWidth || dab->
bounds().height() != dstHeight) {
179 qreal
const centerX = dstWidth * 0.5 + subPixelX;
180 qreal
const centerY = dstHeight * 0.5 + subPixelY;
182 qreal
const majorAxis = 2.0 / fWidth;
183 qreal
const minorAxis = 2.0 / fHeight;
187 QTransform forwardRotationMatrix;
188 forwardRotationMatrix.rotate(rotation);
189 QTransform reverseRotationMatrix;
190 reverseRotationMatrix.rotate(-rotation);
194 pos, forwardRotationMatrix))
201 quint8* maskPointer = mask->
data();
204 quint8* dabPointer = dab->
data();
207 for (
int y = 0; y < dstHeight; y++) {
208 for (
int x = 0; x < dstWidth; x++) {
209 qreal maskX = x - centerX;
210 qreal maskY = y - centerY;
211 forwardRotationMatrix.map(maskX, maskY, &maskX, &maskY);
218 dabPointer += dabPixelSize;
221 maskPointer += maskPixelSize;
227 dabPointer += dabPixelSize;
229 maskPointer += maskPixelSize;
235 reverseRotationMatrix.map(maskX, maskY, &maskX, &maskY);
241 maskX = qRound(maskX);
242 maskY = qRound(maskY);
249 colorSampler.
sampleColor(maskX, maskY, dabPointer);
252 dabPointer += dabPixelSize;
255 maskPointer += maskPixelSize;