- From: Dirk Schulze <dschulze@adobe.com>
- Date: Sun, 7 Apr 2013 12:18:14 -0700
- To: Benjamin Lord <ben@abmcd.com>
- CC: "public-fx@w3.org" <public-fx@w3.org>
On Apr 3, 2013, at 12:29 PM, Benjamin Lord <ben@abmcd.com> wrote: > In responsive design patterns, there are many cases in which content resizes to an SVG viewBox using preserveAspectRatio. But if I'm not mistaken, there is currently no easy way to scale the positioning of certain filters (for example a light source) relative to the viewBox. The only two options are the unscaled user space (userSpaceOnUse) and the filtered object's bounding box (objectBoundingBox). A question for a better understanding: All elements that have a viewBox attribute create a new viewport. The keyword userSpaceOnUse addressed the nearest viewport of the filtered element. That means userSpaceOnUse should already do what you ask for. Can you give more details (maybe with an example?) to understand this issue please? Greetings, Dirk > > If we imagine try to responsively code a spot-lit visual stage, with objects moving around on it, in and out of the spotlight, it's clear that scaling multiple light sources to the bounding boxes of the individual elements moving around on the stage doesn't work. Even if we were to create a redundant empty wrapper element, and call the filter once on that element, such a wrapper element still doesn't offer the power and flexibility of preserveAspectRatio. What I want as an author is to able to delegate the scaling of SVG filters to the viewBox, and use percentage lengths for filter positions, to preserve scalability. > > To put this a bit more extremely, I doubt that there has *ever* been a case when an author truly needed to specify filter scaling and positioning in unscaled global units regardless of the viewBox, in a case in which a viewBox has been specified. In retrospect, maybe a viewBox should have been checked for from the start? But since it's presumably baked hard into the spec now (???), I would like to suggest that the best way to address this use case is to add "viewBox" as another possible value for primitiveUnits. > > Note that implementations are just now catching up with these uses :) > https://bugs.webkit.org/show_bug.cgi?id=113059 > > Reference: > https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#FilterElementPrimitiveUnitsAttribute >
Received on Sunday, 7 April 2013 19:18:45 UTC