Optionally disable antialiasing - implement based on existing SVG 1.1 rendering properties?
revno: 13144 fixes bug: https://launchpad.net/bugs/170356 committer: Krzysztof Kosiński <tweenk.pl@...400...> branch nick: trunk timestamp: Thu 2014-03-13 05:45:38 +0100 message: Provide a toggle in the document properties to optionally turn off antialiasing for display and export. Fixes a nearly 10 year old bug #170356
Questions related to rev 13144 (just curious):
a) Why not implement such a feature based on existing SVG 1.1 rendering instructions (instead of a custom inkscape attribute of <namedview>)? Ideally, the user could then optionally apply this to individual objects (which may trigger bug #170356 if the objects' edges are adjacent), to groups or layers, or to the document itself, and the same effect may even be supported in other SVG renderers?
AFAIU to disable antialiasing globally, these attributes could be added to top-level <svg> element: shape-rendering="crispEdges" text-rendering="optimizeSpeed"
I'm not sure whether this one too: image-rendering="optimizeSpeed"
http://www.w3.org/TR/SVG11/painting.html#RenderingProperties http://www.w3.org/TR/SVG11/painting.html#ShapeRenderingProperty http://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty http://www.w3.org/TR/SVG11/painting.html#ImageRenderingProperty
The attributes are also in the SVG2 draft: http://www.w3.org/TR/SVG2/painting.html#RenderingHints
If implemented based on these rendering attributes, the feature should (or rather: could) also allow to control the rendering of different types separately (i.e. disable for shapes only, or for text only, or both), and maybe other text rendering modes can be added in the future (e.g. aliased with hinting for 'optimizeLegibility').
Note that support for 'image-rendering="optimizeSpeed"' has already been implemented (currently settable on import, and in objects properties for bitmap images (linked, or embedded)).
b) Alternatively (based on other user requests), if the implementation stays a custom inkscape feature only: what about splitting it into a display mode (for rendering on-canvas, in the 'View' menu), and a bitmap export option which can also be used on the command line (without having to first edit the document properties via GUI)?
Regards, V
P.S. Personally, I somewhat disagree with closing bug #170356 based on a solution which globally disables antialiasing (for all shapes and text in the current document) - that report originally tracked an issue with a very specific aspect of antialiasing (adjacent edges); the current solution seems more like a workaround to me (disable antialiasing just for everything, including text (which - especially at smaller sizes - tends to looks bad (AFAIU due to lack of hinting) and objects not affected by bug #170356 at all).
With r13144, antialiasing btw returns if an object (or group) has a reduced object (aka global) opacity, or uses a filter effect, for clipped or masked objects and probably other special cases.
2014-03-13 10:32 GMT+01:00 su_v <suv-sf@...58...>:
revno: 13144 fixes bug: https://launchpad.net/bugs/170356 committer: Krzysztof Kosiński <tweenk.pl@...400...> branch nick: trunk timestamp: Thu 2014-03-13 05:45:38 +0100 message: Provide a toggle in the document properties to optionally turn off antialiasing for display and export. Fixes a nearly 10 year old bug #170356
Questions related to rev 13144 (just curious):
a) Why not implement such a feature based on existing SVG 1.1 rendering instructions (instead of a custom inkscape attribute of <namedview>)? Ideally, the user could then optionally apply this to individual objects (which may trigger bug #170356 if the objects' edges are adjacent), to groups or layers, or to the document itself, and the same effect may even be supported in other SVG renderers?
AFAIU to disable antialiasing globally, these attributes could be added to top-level <svg> element: shape-rendering="crispEdges" text-rendering="optimizeSpeed"
Oops, I forgot about those properties. This is a better idea, but here's a question: should the UI remain the same (toggle in doc properties) or should there be some additional UI to set it on specific elements? Where should I put it - in object properties?
I'm not sure whether this one too: image-rendering="optimizeSpeed"
This is for setting 'nearest' sampling on bitmaps.
Regards, Krzysztof
On 2014-03-13 15:35 +0100, Krzysztof Kosiński wrote:
2014-03-13 10:32 GMT+01:00 su_v <suv-sf@...58...>:
revno: 13144 fixes bug: https://launchpad.net/bugs/170356 committer: Krzysztof Kosiński <tweenk.pl@...400...> branch nick: trunk timestamp: Thu 2014-03-13 05:45:38 +0100 message: Provide a toggle in the document properties to optionally turn off antialiasing for display and export. Fixes a nearly 10 year old bug #170356
Questions related to rev 13144 (just curious):
a) Why not implement such a feature based on existing SVG 1.1 rendering instructions (instead of a custom inkscape attribute of <namedview>)? Ideally, the user could then optionally apply this to individual objects (which may trigger bug #170356 if the objects' edges are adjacent), to groups or layers, or to the document itself, and the same effect may even be supported in other SVG renderers?
AFAIU to disable antialiasing globally, these attributes could be added to top-level <svg> element: shape-rendering="crispEdges" text-rendering="optimizeSpeed"
Oops, I forgot about those properties. This is a better idea, but here's a question: should the UI remain the same (toggle in doc properties) or should there be some additional UI to set it on specific elements? Where should I put it - in object properties?
Personally, I would favour having it available both on object level (object properties dialog), and as document setting.
If inheritance is honored, this would also allow to e.g. set the document to not use antialiasing, but still override it for individual objects (to use antialiasing)?
I'm not sure whether this one too: image-rendering="optimizeSpeed"
This is for setting 'nearest' sampling on bitmaps.
I know - I was unsure what users would expect if a global 'do not use antialiasing' is set in the document properties (blocky rendering vs smooth).
Cheers, V
2014-03-13 18:39 GMT+01:00 su_v <suv-sf@...58...>:
Personally, I would favour having it available both on object level (object properties dialog), and as document setting.
I changed the existing document-level toggle to set the shape-rendering property on the root element.
If inheritance is honored, this would also allow to e.g. set the document to not use antialiasing, but still override it for individual objects (to use antialiasing)?
This is already possible via the XML editor, but it should also be added to the object properties dialog.
For controlling aliasing from the command line, there could be an additional data member in Inkscape::Drawing that would override the SVG properties, though I'm not sue it would be very useful.
Regards, Krzysztof
participants (2)
-
Krzysztof Kosiński
-
su_v