Image class - rotate and flip images

the Status inline  
Image :: RotateFlip (  
    the IN RotateFlipType rotateFlipType  
    )  
 
enum RotateFlipType  
{  
    RotateNoneFlipNone = 0, // specifies no rotation and flip  
    Rotate90FlipNone = 1, // do not specify the 90 degree rotation of the flip  
    Rotate180FlipNone = 2, // do not specify flipped 180 degree rotation  
    Rotate270FlipNone = 3, // not specify a 270 degree rotation flip  
 
    RotateNoneFlipX = 4, // the specified level does not rotate flip  
    Rotate90FlipX = 5, // specified then flipped horizontally by 90 degree rotation  
    Rotate180FlipX = 6, // the specified 180 degree rotation then flipped horizontally  
    Rotate270FlipX = 7, // the specified flipped 270 degrees horizontally rotatably attached  
 
    RotateNoneFlipY = Rotate180FlipX,     
    Rotate90FlipY = Rotate270FlipX,  
    Rotate180FlipY     = RotateNoneFlipX,  
    Rotate270FlipY     = Rotate90FlipX,  
 
    RotateNoneFlipXY   = Rotate180FlipNone,  
    Rotate90FlipXY     = Rotate270FlipNone,  
    Rotate180FlipXY    = RotateNoneFlipNone,  
    Rotate270FlipXY    = Rotate90FlipNone  
}; 

static Bitmap orgpic(_T("D:\\1.PNG")) ; 
orgpic.RotateFlip(Rotate180FlipX       ) ; 
 
Graphics g(GetDC()->GetSafeHdc()) ; 
RectF destRect(0.0f, 0.0f, orgpic.GetWidth(), orgpic.GetHeight()) ; 
g.DrawImage(&orgpic, destRect,0.0f, 0.0f, orgpic.GetWidth(), orgpic.GetHeight(),UnitPixel) ;
Published 117 original articles · won praise 4 · views 80000 +

Guess you like

Origin blog.csdn.net/qq_36266449/article/details/78194675