Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <use xlink:href="#imageElement" filter="url(#innerShadowElement)"/>
- <def>
- <g id="imageElement">
- ...
- </g>
- <use id="shadowElement" xlink:href="#imageElement" transform="..."/>
- <filter id="innerShadowFilter" filterUnits="userSpaceOnUse">
- <feImage result="image" x="0" y="0" xlink:href="#shadowElement"></feImage>
- <feGaussianBlur in="image" stdDeviation="5" result="blur"></feGaussianBlur>
- <!-- Invert the alpha of the graphic and clip it to SourceAlpha -->
- <feComposite operator="out" in="SourceAlpha" in2="blur" result="inverse"></feComposite>
- <!-- The next two steps let us color the shadow -->
- <feFlood flood-color="black" flood-opacity=".5" result="color"></feFlood>
- <feComposite operator="in" in="color" in2="inverse" result="shadow"></feComposite>
- <!-- Place the shadow on top of the original image -->
- <feComposite operator="over" in="shadow" in2="SourceGraphic"></feComposite>
- </filter>
- </def>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement