svg-essentials-examples | repository contains interactive examples | Animation library
kandi X-RAY | svg-essentials-examples Summary
kandi X-RAY | svg-essentials-examples Summary
This repository contains interactive examples and other files created for [SVG Essentials, 2nd Edition] by J. David Eisenberg and Amelia Bellamy-Royds (O’Reilly, 2014). The repository also includes the examples used in [a related post on the O’Reilly Radar blog] ![Cover image of SVG Essentials] If you’re reading the online version of the book, you’ll see these examples embedded in your browser (they are hosted as Github pages). If you’re reading the print book or PDF/ePUB/Kindle formats, these are the examples given as links. Many examples display the code as well as the final SVG, and the code can usually be live edited; type within the code blocks that have a green border, or use the drop-down lists to switch between options, then select “Refresh” to see the results, or “Reset” to undo.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of svg-essentials-examples
svg-essentials-examples Key Features
svg-essentials-examples Examples and Code Snippets
Community Discussions
Trending Discussions on svg-essentials-examples
QUESTION
I can't get Chrome (and Opera) to use SVG filters with decimal values in radius.
Go to http://oreillymedia.github.io/svg-essentials-examples/ch11/fe_morphology.html and try putting 0 or 0.5 in the radius field. In Chrome there is no change but in Firefox the erode works.
I have a locale with decimal COMMA, does that play a role? With comma it gets interpreted as x,y though.
Is that a known issue? Any workarounds?
...ANSWER
Answered 2019-Feb-06 at 04:05Zero is not a valid value for the radius
attribute. To quote the spec:
radius = "number-optional-number"The radius (or radii) for the operation. If two numbers are provided, the first number represents a x-radius and the second value represents a y-radius. If one number is provided, then that value is used for both X and Y. The values are in the coordinate system established by attribute ‘primitiveUnits’ on the ‘filter’ element. A negative value is an error (see Error processing). A value of zero disables the effect of the given filter primitive (i.e., the result is a transparent black image). If the attribute is not specified, then the effect is as if a value of 0 were specified.
The radius value determines the size of a convolution matrix that is used to process the image. By definition that matrix has to have an integer number of columns and rows. However the spec is not clear on whether fractions should be rounded up or down.
It appears that Firefox always rounds up, whereas Chrome/Webkit always rounds down.
In any case, fractional values are meaningless, so you should always use integers.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install svg-essentials-examples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page