! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
small svg images aren't dealt with properly as backdrops
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfdesktop
Component:
General

Comments

Description Matthew Harvey 2012-05-19 23:48:55 CEST
Created attachment 4439 
created with git diff --relative > svgEnhancement.patch

As you know, SVG images can easily be scaled to any size without pixilation, but when I was using one as a background, it became pixilated when set to something larger than it's "native" size. The native size of an svg doesn't really mean anything though. It should scale well to almost any size. 

Anyway, the problem is that the function in question retrieves the file as a pixmap and then calculates the size needs of the final image and resizes as needed. The attached path is my proposed solution to this. I use another gdk function that gets the "native" width and height of the image without retrieving the rest of the image or generating a pixmap. It then calculates the size requirements of the backdrop similarly to how it normally would, and then it retrieves the file as it is needed. This works because the gdk_pixmap_new_from_file_at_scale deals with the complexities of SVG files.

I wasn't able to break the proposed solution tested with SVG JPG and PNG on a 1366x768 monitor, but you guys might be able to.

Bug #8920

Reported by:
Matthew Harvey
Reported on: 2012-05-19
Last modified on: 2013-01-26

People

Assignee:
Eric Koegel
CC List:
4 users

Version

Version:
Unspecified

Attachments

Additional information