[Interest] QML Image size vs sourceSize strange things

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Tue Mar 23 15:52:41 CET 2021


Il 23/03/21 14:16, Jérôme Godbout ha scritto:
> Do you really need to same memory by reducing the source size? I think 
> you should left the source size alone and sample the image from the full 
> source. Source size for SVG doesn’t make any sense, it’s vectoriel, 
> doesn’t have any size, it can scale to any dimension.

This isn't accurate. SVG files have a builtin "wanted" size, which is 
IIRC what Qt would use by default:

> https://www.w3.org/TR/SVG11/struct.html#SVGElementWidthAttribute

By explictly setting `sourceSize` you're asking Qt to rasterize the SVG 
at a different resolution rather than the wanted one (and downscaling 
when rendering).


My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210323/c250be03/attachment.bin>


More information about the Interest mailing list