void ImageViewer::horFilp()
{
image = image.mirrored(true, false);
imageLabel->setPixmap(QPixmap::fromImage(image));
}
2、垂直翻转
void ImageViewer::verFilp()
{
image = image.mirrored(false, true);
imageLabel->setPixmap(QPixmap::fromImage(image));
}
3、顺时针旋转
void ImageViewer::clockwise()
{
QMatrix matrix;
matrix.rotate(90.0);
image = image.transformed(matrix,Qt::FastTransformation);
imageLabel->setPixmap(QPixmap::fromImage(image));
}
4、逆时针旋转
void ImageViewer::anticlockwise()
{
QMatrix matrix;
matrix.rotate(-90.0);
image = image.transformed(matrix,Qt::FastTransformation);
imageLabel->setPixmap(QPixmap::fromImage(image));
}
Copyright © 2024 妖气游戏网 www.17u1u.com All Rights Reserved