Hi Pete, wow that's a fantastic reply thanks.. I was kinda trying things a long those lines. Have been away fro the weekend but spent this afternoon trying the code!
It does however give one very strange result.. If i use say a path with angles : <path d="M0,0, l20,30 40,75 120,10 220,210" stroke="wheat" fill="none" stroke-width="40"/> rather than the original rects Then it gives this sort of ziz-zag aliasing type look ( well in webkit browsers at least) along the egde with small white stripes... I can kinda fix this with a second path slightly contracted as a final mask for the effect but this would limit me doing the effect with soft edges.. Can you think of any other way to do it ? I was thinking something like : Place the colours on a layer at the very botom, take the luminanceToAlpha of the image and place that as a mask onto a white layer ( feFlood ) and then take the oposite of the image luminanceToAlpha and use that to mask a black layer and place them all on top of each other? Do you think that that might work? Many thanks James --- In [email protected], Peter Schonefeld <peter.schonefeld@...> wrote: > > Hi James, > > The following might be a step in the right direction... > > <defs> > > <g id="colorLayer" opacity="1"> > <rect x="0" y="0" width="200" height="400" fill="blue" /> > <rect x="400" y="0" width="200" height="400" fill="red" /> > </g> > > <filter id="fltr" x="0" y="0" width="100%" height="100%" > > <feImage xlink:href="#colorLayer" result="colors" /> > <feColorMatrix in="SourceGraphic" type="saturate" values="0" > result="desat"/> > <feColorMatrix in="desat" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 > 0 0 -1 0 1 0 0 0 1 0" result="desatInvert"/> > <feColorMatrix type="luminanceToAlpha" in="desatInvert" > result="alphaMask" /> > <feComposite in="colors" in2="desat" operator="arithmetic" > k1="1" result="darken"/> > <feComposite in="colors" in2="desat" operator="arithmetic" > k1="1" k2="1" k3="1" result="lighten"/> > <feBlend in="alphaMask" in2="lighten" mode="screen" > result="blendA" /> > <feComposite in2="alphaMask" in="darken" operator="in" > result="blendB"/> > <feMerge> > <feMergeNode in="blendA"/> > <feMergeNode in="blendB"/> > </feMerge> > </filter> > > </defs> > > <image xlink:href="imgb.jpg" width="600" height="400" > filter="url(#fltr)"/> > > In summary, define your colorful shapes in the defs g element and then use > a combination of blend and composite ops to get the color like effect. The > alphaMask node helps bring the dark values back. If you need to retain the > colors of the original graphic you should be able to use a composite of the > #colorLayer's SourceAlpha to mask outside of the color shapes. > > Would love to know if you find another way besides this! > > Pete > http://VectorShapes.com > > > [Non-text portions of this message have been removed] > ------------------------------------ ----- 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/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> 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/

