Rectangle smooth: doesn’t work when radius is specified
Found interesting thing about Rectangle. I have rotation angle specified, and to avoid aliasing I have enabled smooth: true. But if there is also radius: property specified for the rectangle, smooth doesn’t work anymore, and aliasing is again there. Is there any way to avoid aliasing when Rectangle is rotated and radius is specified?
- Rectangle {
- id: frame
- x: image1.x-5
- y: image1.y-5
- radius: 5
- smooth: true
- height: image1.height + 10
- width: image1.width + 10
- color: "lightgray"
- scale: image1.scale
- rotation: image1.rotation
- }
8 replies
The latest QML is in the main Qt repository (http://qt.gitorious.org/qt/qt), in the 4.7 branch.
It’s possible this is a graphics system issue — what platform and graphics system are you running with? Do you use QGLWidget for the QDeclarativeView’s viewport?
I’m experiencing the same issue with Qt 4.8.1 and QtQuick 1.1 on Linux:
- import QtQuick 1.1
- Item {
- width: 150; height: 150
- Rectangle {
- width: 100; height: 100
- smooth: true; color: "red"; rotation: 10
- // radius: 5
- anchors.centerIn: parent
- }
- }
Without the radius:
With the radius:
It is like this both when opening the qml file with qmlviewer, and when manually opening it with a QDeclarativeView like this:
- #include <QtGui/QApplication>
- #include <QtDeclarative/QDeclarativeView>
- int main(int argc, char *argv[])
- {
- QDeclarativeView view;
- view.setResizeMode( QDeclarativeView::SizeRootObjectToView );
- view.show();
- return app.exec();
- }
Also, switching between “native” and “raster” graphics system does not seem to have an effect.
Any idea what could be causing this?
You must log in to post a reply. Not a member yet? Register here!






