QtQuick antialiasing
-
-
You can set the "antialiasing" property to true on any item, including the Canvas. From the documentation:
"Primarily used in Rectangle and image based elements to decide if the item should use antialiasing or not. Items with antialiasing enabled require more memory and are potentially slower to render.
The default is false"
I think the default should really be true for some items like the Canvas at least.
-
I tested the Rectagle item with antialiasung property set to true and it was not antialiased until I used the QSurfaceFormat.
Additional - there is no info about how this antialiasing will be created - using this property, it would be (theoretically) multisampled? With how many samples? -
The Rectangle item should get antialiased without changing the QSurfaceFormat, it doesn't use multisampling. Of course it will only be antialiased if it has a rounded corner (a radius set), otherwise there's nothing to antialias.
A bezier curve however is a custom item and will probably need multisampling to be antialiased, it all depends on how it is being rendered.
-
It should be, if you do "antialiasing: true" in the Rectangle. Here's an example, run it with qmlscene:
@
import QtQuick 2.0Rectangle {
width: 800
height: 600Rectangle { x: 200 y: 200 width: 400 height: 200 rotation: 20 antialiasing: true color: "red" MouseArea { anchors.fill: parent onPressed: { parent.antialiasing = !parent.antialiasing } } }
}
@ -
but there is a problem with antialiasing property in qtquick2.0. It usage high CPU in animating objects. For resolving that i have changed my graphic card settings instead of antialiasing property.