Skip to content

Avoid percentages for sizes? #51

@barryrowlingson

Description

@barryrowlingson

Currently ugd's svg and svgp renders generate a background rectangle with 100% width and height to produce output like this:

<rect width="100%" height="100%" stroke="none" fill="#FFFFFF"/>

Sadly (for me) this triggers a long-standing and poorly attended bug in the Qt toolkit where these percentages are read as pixel sizes, resulting in a 100x100 pixel rectangle. Percentage handling in Qt's SVG code looks very neglected...

https://qt-project.atlassian.net/browse/QTBUG-2919

I've tried the base svg() driver - this produces a rectangle with pixel sizes instead of percentages, so that works in Qt, but it has its own problems with Qt's SVG handling when displaying rasterImage objects (which ugd does perfectly).

If ugd used pixel sizes that would work round the Qt bug. Otherwise (assuming Qt aren't going to fix their bug in the next 16 years) I'll work round it via some XML transformation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions