xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 7KB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2021-01-11
  • 語言: 其他
  • 標簽: 自繪??

資源簡介

Qt繪制和自旋轉源碼,主要是一個簡單的小程序,能夠使用兩種方法旋轉一個輸入圖像;包括了qt的繪制和圖像的矩陣變換

資源截圖

代碼片段和文件信息

#include“ImageFunctions.h“

QPixmap?rotateImageWithTransform(const?QPixmap?&src?int?angle)
{
????QMatrix?matri;
????//遷移到中心
????matri.translate(src.width()/2.0src.height()/2.0);
????//中心旋轉
????matri.rotate(angle);
????//回退中心
????matri.translate(-src.width()/2.0-src.height()/2.0);
????//執行坐標映射變化
????//旋轉后圖像大小變化了?需要提前進行裁剪?如果在旋轉后裁剪
????//則需要計算使用三角函數計算
????//中心偏移
????int?cubeWidth?=?qMin(src.width()src.height());
????QRect?cubeRect(00cubeWidthcubeWidth);
????cubeRect.moveCenter(src.rect().center());
????qDebug()<<“?cube?“<???????????<<“?src?rect?“<
????auto?retImg?=?src.copy(cubeRect);
????retImg?=?retImg.transformed(matriQt::SmoothTransformation);
????return?retImg;
}

QPixmap?rotateImageWithPainter(const?QPixmap?&src?int?angle)
{
??

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-07-13?21:03??ImageRotation\
?????文件????????1526??2020-07-13?21:03??ImageRotation\ImageFunctions.cpp
?????文件?????????324??2020-07-13?20:16??ImageRotation\ImageFunctions.h
?????文件????????1071??2020-07-13?19:40??ImageRotation\ImageRotation.pro
?????文件???????22410??2020-07-13?19:33??ImageRotation\ImageRotation.pro.user
?????文件?????????192??2020-07-13?19:53??ImageRotation\main.cpp
?????文件????????1518??2020-07-13?20:50??ImageRotation\MainWindow.cpp
?????文件?????????581??2020-07-13?20:46??ImageRotation\MainWindow.h
?????文件????????5180??2020-07-13?20:40??ImageRotation\MainWindow.ui

評論

共有 條評論