David [Leunen] wrote:
>I'm missing two filters in SVG. Or I don't know if they exist or not. Filters are just complicated enough it's not always easy to tell. Based on the questions you've asked, it sounds like you have a pretty good understanding of what's there and what isn't. >The first one is a simple transform. I don't want to apply the transform >directly to the svg element, but rather to an intermediate filter primitive >result. It is already possible for translations with feOffset, but not for >other kinds of transformations, afaik. >I think it would be great to make shadow projections (*skew*) and reflection >(negative *scale*). Interesting idea. This would not be hard to implement with script: grab the thing from the DOM; clone it; remove it from its parent (to simulate a z-order move to front), append the clone with a transform to the parent, then reappend the original. Doing it through markup would be handy, though feOffset tends to be so slow (and I'm not quite sure why) (look at this attempt to move slices of an image without making copies using feOffset http://srufaculty.sru.edu/david.dailey/svg/later/offsets7.svg to see slow) so feOffset with a transform would be really slow. >There is a workaround using feDisplacementMap (see example below). But this >filter has some issues with performance, ease of use and I can't see how to >make the map dimension relative to the filtered object. Your example didn't come through (yahoogroups doesn't allow attachments I think), so you may have to put on a server somewhere and include a link. The problem with feDisplacementMap that I can see is that while it can be used to deform objects, the deformation is a bit unpredictable. See attempt1 <http://srufaculty.sru.edu/david.dailey/svg/later/displace2.svg> attempt2 <http://srufaculty.sru.edu/david.dailey/svg/later/displace4.svg> attempt3 <http://srufaculty.sru.edu/david.dailey/svg/later/displace7.svg> >The second feature I'm missing is a blur with a variable stdDeviation >(depending on the pixel location). >I know I can make the stdDeviation different for each axis, but it's not >what I want. >I want the blur to be null at the bottom part, and increase progressively >toward the top of the object. >This also would be very useful for shadow projections (of a vertical object >on a horizontal ground). Agreed. This would be cool and agreed that it is not to be done quite the way you're talking about. I've thought about it before and the best approach I've thought of would involve something like this: create two versions one more blurred and the other less, and then use a mask that fades from one to the other from top to bottom. (with SMIL enabled browser http://srufaculty.sru.edu/david.dailey/svg/newstuff/mask3.svg does something like this but without the blurring) >The only workaround I can think of would involve a displacement map that >would enlarge the bottom part (a trapezoidal-like transform), apply the blur >effect, and then apply the inverted displacement map in order to have the >shape back in place. Sorta like http://srufaculty.sru.edu/david.dailey/svg/distort.svg ? That's going to be hard to control, and I'm not sure quite how you'd invert the displacement map.... Maybe I'm confused about what you mean. Cheers David [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: mailto:[EMAIL PROTECTED] mailto:[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/