[Development] Aliasing with QSGRectangleNode

Gunnar Sletta gunnar at sletta.org
Wed Dec 16 09:05:09 CET 2015


It is curious that the aliasing in the 1x image is not reproducible with the Rectangle {} element and only for some of the elements.. Some subtlety with the private api. One difference might be that you are giving your rectangle nodes an explicit x/y while the Rectangle element uses a transform node. It would require a bit of digging..

The segmentation you see in the 2x and 6x images is a different problem. That comes from the fact that the rectangle node doesn't know its render size, so when the thing gets scaled up by 2x or 6x it doesn't know to take that scale factor into account. This is another place that needs to look up QQuickWindow::effectiveDevicePixelRatio() and apply that to the segmentation factor.

cheers,
Gunnar

> On 15 Dec 2015, at 17:03, Curtis Mitch <mitch.curtis at theqtcompany.com> wrote:
> 
> 
> Hi.
> 
> I'm implementing a busy indicator for the new controls using QSGRectangleNode. Even after calling rectNode->setAntialiasing(true), I'm noticing some strange aliasing going on. Take a look at the various attached screenshots to see what I'm talking about (the 2x/6x variants are with QT_SCALE_FACTOR set). For filled "rectangles", there seems to be a lack of antialiasing on the outer left side, and for unfilled rectangles with borders, it's missing on the left inner side.
> 
> The attached zip file contains a simplified example to try out.
> 
> Anyone know why this is happening?
> 
> Cheers.<busyindicator-simplified-example.zip><aliasing.png><aliasing-2x.png><aliasing-6x.png>_______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list