47 const Pt::ssize_t fromWidth = from.width();
48 const Pt::ssize_t fromHeight = from.height();
49 const Pt::ssize_t toWidth = to.width();
50 const Pt::ssize_t toHeight = to.height();
52 auto fromLines = lineView(from);
53 auto toLines = lineView(to);
54 auto fromLine = fromLines.begin();
55 auto toLine = toLines.begin();
56 auto toLineEnd = toLines.end();
60 while(toLine != toLineEnd)
62 Pt::ssize_t rows = (toHeight - dh + fromHeight - 1) / fromHeight;
64 for(Pt::ssize_t i = 0; i < rows; ++i)
66 auto fromIt = fromLine->begin();
69 for(
auto& toPixel : *toLine)
74 fromIt += dw / toWidth;
81 dh += rows * fromHeight;
82 fromLine += dh / toHeight;
void blockScale(const FromView &from, ToView &to)
Block scale from a source view to a target view.
Definition BlockScale.h:45