GenerallyHelpfulSoftware / SVGgh

A framework for using SVG artwork in iOS Apps. Includes a UIView and a button class, printing and PDF export.
MIT License
141 stars 37 forks source link

support filter svg element? #12

Open aksonov opened 9 years ago

aksonov commented 9 years ago

Is it difficult to support filters? http://www.w3schools.com/svg/svg_filters_intro.asp

example:

        <filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-2">
            <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
            <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
            <feColorMatrix values="0 0 0 0 1   0 0 0 0 1   0 0 0 0 1  0 0 0 0.35 0" in="shadowBlurOuter1" type="matrix"
            <feMerge>
                <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
                <feMergeNode in="SourceGraphic"></feMergeNode>
            </feMerge>
        </filter>
grhowes commented 9 years ago

I'd say it's difficult to support filters while trying to keep things in the Core Graphics domain where I can generate lightweight PDFs and print with resolution independence. Presumably, filters could be handled via Core Image, although it would raise the complexity of the library by "a lot."