[Interest] QML Canvas with Frame buffer as render target has scaled output

Rutledge Shawn Shawn.Rutledge at theqtcompany.com
Fri Jul 10 16:10:04 CEST 2015

On 10 Jul 2015, at 14:41, Rogerio Nicolau <r.nicolau at learningclip.co.uk> wrote:

> I have the Canvas larger than the screen actually, it's inside a ScrollView so the user can scroll if needed. I did try reducing it to an area smaller than the screen size, but that does not change the behaviour.

Sounds like a different bug then.  Mine is QTBUG-47152

> On 10/07/2015 12:07, Rutledge Shawn wrote:
>> On 10 Jul 2015, at 12:50, Rogerio Nicolau <r.nicolau at learningclip.co.uk> wrote:
>>> Hi
>>> This is a hardware specific issue and I suspect a problem in a lower
>>> layer than Qt, but I wanted to check if anyone might have some other idea.
>>> The problem happens on a Tegra Note Android tablet, other
>>> hardware/platforms work fine. When I set a Canvas object's renderTarget
>>> to Canvas.FramebufferObject and use a Context2D to draw to it, what is
>>> drawn on the screen is scaled down by a factor of 0.625 (even though the
>>> canvas transform has not been changed in anyway).
>>> Using Canvas.Image does not cause the problem, unfortunately I can't use
>>> that because it is too slow (basically the app captures mouse move
>>> events to sketch in real time and the capture rate decreases too much).
>>> Any suggestions?
>> How small are you trying to render?  I noticed this only at small sizes, on Linux, so worked around it by setting the Canvas width and height to double the desired size and then setting scale to 0.5.  But I wasn’t trying to draw interactively with the mouse, so that’s kindof an impractical workaround in that case...

More information about the Interest mailing list