I'm trying to mirror my images but it is not working for an image that must have a transpareny color.
The following code is to mirror the image if there is no transparency: ( this is working )
[spoiler]
if( (pImage->MirrorHorizontal() == true) && (pImage->MirrorVertical() == true) )
{
StretchBlt( m_hDC, x, y, rect.right-rect.left, rect.bottom-rect.top, hdcmem, (rect.right-rect.left)-1,(rect.bottom-rect.top)-1, -(rect.right-rect.left), -(rect.bottom-rect.top), SRCCOPY );
}
else if( (pImage->MirrorHorizontal() == true) && (pImage->MirrorVertical() == false) )
{
StretchBlt( m_hDC, x, y, rect.right-rect.left, rect.bottom-rect.top, hdcmem, (rect.right-rect.left)-1, rect.top, -(rect.right-rect.left), rect.bottom-rect.top, SRCCOPY );
}
else if( (pImage->MirrorHorizontal() == false) && (pImage->MirrorVertical() == true) )
{
StretchBlt( m_hDC, x, y, rect.right-rect.left, rect.bottom-rect.top, hdcmem, rect.left, (rect.bottom-rect.top)-1, rect.right-rect.left, -(rect.bottom-rect.top), SRCCOPY );
}
else
{
StretchBlt( m_hDC, x, y, rect.right-rect.left, rect.bottom-rect.top, hdcmem, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, SRCCOPY );
}
[/spoiler]To draw Images with a transparency I use this function:
TransparentBlt( m_hDC, x, y, rect.right-rect.left, rect.bottom-rect.top, hdcmem, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, pImage->GetTransparencyColor() );
And when I try to mirror the image like the same way I did with StretchBlt my image vanishes.
Do someone know why this not works with TransparentBlt, I've searched 20 sites for working properly with this function but I can't find something to mirror my image.
Kind Regards,
B. Jonathan