30 #ifndef PT_GFX_BLOCKSCALE_H
31 #define PT_GFX_BLOCKSCALE_H
33 #include <Pt/Gfx/Api.h>
44 template<
typename InIterT,
typename OutIterT>
45 void blockScale(InIterT from, Pt::ssize_t fromWidth, Pt::ssize_t fromHeight,
46 OutIterT to, Pt::ssize_t toWidth, Pt::ssize_t toHeight)
57 for(Pt::ssize_t x = 0; x < toWidth; ++x)
62 for(dw += fromWidth; dw >= toWidth; ++from, dw -= toWidth)
69 while( (dh += fromHeight) < toHeight );
82 template<
typename InIterT,
typename OutIterT,
typename AssignT>
83 void blockScale(InIterT from, Pt::ssize_t fromWidth, Pt::ssize_t fromHeight,
84 OutIterT to, Pt::ssize_t toWidth, Pt::ssize_t toHeight,
96 for(Pt::ssize_t x = 0; x < toWidth; ++x)
101 for(dw += fromWidth; dw >= toWidth; ++from, dw -= toWidth)
108 while( (dh += fromHeight) < toHeight );
110 while(dh >= toHeight)
void blockScale(InIterT from, Pt::ssize_t fromWidth, Pt::ssize_t fromHeight, OutIterT to, Pt::ssize_t toWidth, Pt::ssize_t toHeight)
Generic block scale implementation.
Definition: BlockScale.h:45