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

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 UTC