我现在有一个矩形的图片,想显示出来的图片是椭圆形的,如何实现呢?
在qt4,我实现的方式是:
QPainter q1(this);
...
q1.setPixmap(pixmap);
QPainerPath path;
path.addRect(QRect());
path.addEclips(QRect());
q1.drawPath(path);
就可以显示了,但在qt3.3下没有 QPainerPath这个类。
直接 drawPixmap() , drawRect(), drawEclips() 后是一片空白!