Is there any way to flip a Bitmap with function like BitBlt or StretchBlt. I'am getting really confused by the Cooridnates. Currenty i've tried some variation of this:
BitBlt(hdc,0,bmp.bmHeight,bmp.bmWidth,0,hdc,0,0,SRCCOPY);
Is it even possable with these functions?
BitBlt
does not allow for transformations other than translation. StretchBlt
will do this, though. Just specify a negative destination width or height (depending on which axis you want to flip around), and adjust the corresponding destination origin coordinate so that it refers to the other side. For instance, to flip a 200x100 image horizontally, you’d do
StretchBlt(
dest,
200, 0, -200, 100,
src,
0, 0, 200, 100,
SRCCOPY);