Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. SVG generator - precision / size
Forum Updated to NodeBB v4.3 + New Features

SVG generator - precision / size

Scheduled Pinned Locked Moved Unsolved General and Desktop
svgqpainterprecision
1 Posts 1 Posters 459 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vania2020
    wrote on 6 Oct 2020, 21:02 last edited by
    #1

    Hello,

    I am trying to generate SVGs using QSvgGenerator - the resulting SVGs are huge

    when I use 3rd party tools such as https://github.com/svg/svgo to optimize the SVG size - I am able to reduce the size down to something like 6-7 percent of what QSvgGenerator is generating

    the biggest effect seams to be reducing the "precision" as described in the svgo help: "-p PRECISION, --precision=PRECISION : Set number of digits in the fractional part"

    I was wondering would it be possible to reduce precision directly when generating the SVG? I could not find anything in documentation that would allow for that either in QPainter or QSvgGenerator :(

    if its not propagated as an option, maybe it can be tuned somewhere in code?

    Thanks
    Ivan

    1 Reply Last reply
    0

    1/1

    6 Oct 2020, 21:02

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved