hey just wondering,
can u invert the colors of the mask within SVG through a filter?

thanx arian


--- In svg-developers@yahoogroups.com, Holger Will <[EMAIL PROTECTED]> wrote:
>  Hi Arian
> 
> to mask an image with a nother image, use the following syntax:
> 
> <mask id="mask">
> <image xlink:href="maske.jpg" x="0" y="0" width="100" height="100"/>
> </mask>
> 
>  <image mask="url(#mask)" xlink:href="svg1.png" x="0" y="0" width="100" 
> height="100"/>
> 
> one remark though, the image is visible, where the mask is white and 
> transparent on black pixels.
> so if you want to show the image inside the black area of your mask 
> image, you have to invert the colors.
> 
> to achive this effect with svg only technology, you could  use a 
> gaussianBlur filter to feather out the mask.
> 
> <filter id="filter">
>                <feGaussianBlur stdDeviation="2"/>
> </filter>
>  <mask id="mask">
>                 <rect  x="0" y="0" width="100" height="100" />
>                 <g filter="url(#filter)">
>                                   <rect rx="10" ry="10" x="10" y="10" 
> width="80" height="40" fill="white"/>
>                                   <circle cx="50" cy="60" r="30" 
> fill="white"/>
>                  </g>
> </mask>
> 
>  <image mask="url(#mask)" xlink:href="svg1.png" x="0" y="0" width="100" 
> height="100"/>
> 
> hope that helps
> Holger
> 
> 
> arianhojat2000 wrote:
> 
> >
> > I rememeber see applying a mask by just creating a
> > <radial/linearGradient> and apply that as a mask to an <image>...
> > I was wonder what the syntax for that was...
> >
> >
> > But more importantly...
> > If i had an image and i wanted to use that image as a mask for another
> > image in SVG, how can this be done. Basically a pic and an image of a
> > custom black and white feather (such as
> > http://www.carla146.it/tutor/tutorimm/40lavoramasch/04.jpg). 
> > <http://www.carla146.it/tutor/tutorimm/40lavoramasch/04.jpg%29.>
Can this
> > be done or SVG only uses alpha masks from gradients you create
> > internally via gradients?
> >
> > this is kinda important so if u got an answer, i shall worship u! hehe
> > thanx!





-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to