Rectangle and text drawn using QQuickPaintedItem isn't sharp in iOS devices
-
wrote on 25 Mar 2015, 10:42 last edited by literA2
I am having problem with rectangle and text drawn using QPainter on iOS devices ONLY. I tried building it into different iOS simulators (iP4S, iP5/S, iP6/+) and actual devices (iP4S, iP6, iPad Air) the same problem though less visible on large screen devices. The problem didn't occur on Android.
QQuickPaintedItem antialiasing and smooth property have been enabled within the constructor.
QPoints of the rectangle were all integers and didn't fall into floating coordinates.
RenderHint has been enabled.
I've tried using QPainterPath in creating roundedRect, same issue.Here's the sample:
Please advise, TIA.
-
wrote on 30 Mar 2015, 16:35 last edited by
Regarding the text, found out that it has been scaled that is why it appeared pixelated.
Read in one of the topic here that anti aliasing isn't working on iOS.Is there any work-around on this?
-
I have got the same problem. The circle / triangle rendered via QQuickPaintedItem is blurred. Since the geometry system used in Qt iOS is "point" instead of "pixel". (e.g iPhone 6 : 1 pt = 2 px , iPhone 6+ : 1 pt = 3px). The rendered image will be scaled up to 2x / 3x . AA is not helpful in this case.
Finally , I can not find any way to fix with QQuickPaintedItem. I just changed to use QQuickItem.
-
I have got the same problem. The circle / triangle rendered via QQuickPaintedItem is blurred. Since the geometry system used in Qt iOS is "point" instead of "pixel". (e.g iPhone 6 : 1 pt = 2 px , iPhone 6+ : 1 pt = 3px). The rendered image will be scaled up to 2x / 3x . AA is not helpful in this case.
Finally , I can not find any way to fix with QQuickPaintedItem. I just changed to use QQuickItem.
wrote on 1 Apr 2015, 08:58 last edited by literA2 4 Jan 2015, 09:24@benlau said:
Finally , I can not find any way to fix with QQuickPaintedItem. I just changed to use QQuickItem.
Hi, thank you for your response. Since you used QQuickItem instead, did you used updatePaintNode() in painting and didn't used QPainter?
Can you please provide me a simple code in implementing QQuickItem?
Actually, I tried creating rectangles using QSGGoemetryNode however i can't find any example on how to draw text using QSG without using QPainter.
Sorry i'm still new to integrating c++ in QML. TIA.
4/4