我在缩放和转换时遇到问题QGraphicsPixmapItem
。我创建了图形编辑器,我在其中使用QGraphicsItem
初始大小 100,100,之后我通过setTransform()
方法调整和旋转它。
之后,我将存储此转换并将其用于我的另一个名为 player 的应用程序,在该应用程序中,我使用这些转换并在其上显示图像和视频,QgraphicsPixmapItem
如果我设置缩放和setTransform
图像清晰度的方法,我现在将用于显示图像其清晰度被破坏.
即使我缩放和转换它是否可以保持清晰。我使用的图像是 2560x1440 像素。任何帮助将不胜感激。
代码是:
QGraphicsPixmapItem *pixitem = new QGraphicsPixmapItem;
pixitem->setFlags(QGraphicsItem::ItemIsMovable);
pixitem->setPos(50,50);
QTransform trans;
trans.setMatrix(4.20399,2.9286,0,-3.86601,0.761397,0,33.1015,-134.5,1);
pixitem->setPixmap(QPixmap("abc.jpg").scaled(100,100));
pixitem->setTransform(trans);
pixitem->setShapeMode(QGraphicsPixmapItem::MaskShape);
scene->addItem(pixitem);