Jump to content
You must now use your email address to sign in [click for more info] ×

msageryd

New Members
  • Posts

    3
  • Joined

  • Last visited

  1. I just discovered another hack. 1. draw a rect 2. convert to curves 3. add another node on one of the lines (without altering the line) When this is exported to SVG, the curve will be exported as a path and the extra node will be removed. I suppose the removal of the node is a reasonable optimization.
  2. Chiming in.. I need this for the exact same reason. I'm saving polygon points to a database. I don't know what was available in 2017, but nowadays there is a "Convert to curve" function. If I convert a rect to a curve it shows up as "(curve)" in the layer browser. But AD still exports those as rect in the SVG if they are rectangular. I suppose this is a great optimization for the created SVG, but I would rather decide this myself. Is there any way to do this in 2020 without using Alfred's hack?
  3. The attached file (adr_6.2.svg) is an optimized SVG (with SVGO). It renders correctly in Safari and Chrome on MacOS Mojave, but Affinity Design does not render it correctly. The non optimized file (ADR_62._original) works in AD. Something in the optimization is not handled well by AD. The fact that the browsers renders correctly leads me to believe that AD has a bug. This is how the original SVG looks in AD. Chrome and Safari renders the optimized image like this as well: This is how the optimized image it looks in AD: The SVGO params: svgo = new SVGO({ plugins: [ { cleanupAttrs: true, }, { removeDoctype: true, }, { removeXMLProcInst: true, }, { removeComments: true, }, { removeMetadata: true, }, { removeTitle: true, }, { removeDesc: true, }, { removeUselessDefs: true, }, { convertTransform: true, }, { removeEditorsNSData: true, }, { removeEmptyAttrs: true, }, { removeHiddenElems: true, }, { removeEmptyText: true, }, { removeEmptyContainers: true, }, { removeViewBox: true, }, { cleanUpEnableBackground: true, }, { convertStyleToAttrs: false, //do not activate! }, { convertColors: true, }, { convertPathData: true, }, { convertTransform: true, }, { removeUnknownsAndDefaults: true, }, { removeNonInheritableGroupAttrs: true, }, { removeUselessStrokeAndFill: true, }, { removeUnusedNS: true, }, { cleanupIDs: true, }, { cleanupNumericValues: true, }, { moveElemsAttrsToGroup: true, }, { moveGroupAttrsToElems: true, }, { collapseGroups: true, }, { removeRasterImages: true, }, { mergePaths: true, }, { convertShapeToPath: false, }, { sortAttrs: true, }, { transformsWithOnePath: true, }, { removeDimensions: true, }, ], }); adr_6.2.svg ADR_6.2_original.svg
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.