W3C home > Mailing lists > Public > www-style@w3.org > February 2009

Re: [CSSWG] Minutes and Resolutions 2009-02-04: box-shadow and border-image

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 17 Feb 2009 16:13:46 -0600
Message-ID: <dd0fbad0902171413rab6bacay5abd0353712fc7c5@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
On Tue, Feb 17, 2009 at 2:51 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> Tab Atkins Jr. wrote:
>>
>> Imagine a simple black and white drawing.  We want to spread the black
>> areas.  We can do this be tracing the edges of the black areas with a
>> brush set to the size we want.  (Obviously browsers won't be doing
>> this under the hood, but the effect is equivalent to apply a minimum
>> filter.)
>>
>> Using euclidean distance is like using a circular brush.  Lines stay
>> lines, curves stay curves, but sharp corners (actually it applies to
>> things that aren't necessarily 'sharp', just anything with a radius of
>> curvature less than your brush) get transformed into a curve.
>>
>> Using manhattan distance is like using a square brush.  Lines stay
>> lines, curves stay curves, but corners *stay* corners.
>
> Isn't that only true if the corners are horizontal and vertical lines
> that intersect at 90deg angles? If I outline a star with a square brush,
> the top point looks like this:
>
>                     ______
>                    /      \
>                   /        \
>                  /    /\    \
>                 /    /  \    \

Huh.  Yeah, you're right.  Don't know why I didn't see that
immediately.  And since applying a manhattan distance metric really
*is* just like tracing it with a square brush, this is exactly what
would result.  An inverse spread would maintain all corners, but would
gradually turn cut-off corners (like what is produced by tracing the
start with a square brush) into sharp corners.

In that case, spread is just all kinds of crazy.

~TJ
Received on Tuesday, 17 February 2009 22:14:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:16 GMT