RE: RFC: ability to assign images to corners

> -----Original Message-----
> From: Bert Bos [mailto:bert@w3.org] 

> Another idea to consider, discovered by Tantek Celik, is that in many
> cases, the images are mirrored or rotated versions of each other.
> Including the possibility to mirror and rotate images in the syntax
> might or might not make the syntax easier.

The syntax can be easy if you build on some 'default' behavior.
For example if you type (I'll use corner-image as property)

corner-image: <image> <starting corner> <mode> <corners>;

Where <starting corner> specifies the initial corner, the algorithm
should rotate for the other corners by taking it from there. So if I
write

one{
corner-image: url(myCorner.png) top-left;
}

two{
corner-image: url(myCorner.png) top-right;
}

image is

+#
##

Renders


+#-----#+
##     ##
|  one   |
##     ##
+#-----#+


#+-----+#
##      ##
|   two   |
##      ##
#+-----+#


The algorithm just flips the image horizontically and/or vertically for
the next corner.

The <mode> flag can  define the flipping algorithm. Possible values I
see are

clockwise
counter-clockwise
horizontal-mirror
vertical-mirror

So 

three{
corner-image: url(myCorner.png) top-left counter-clockwise;
}

four{
corner-image: url(myCorner.png) top-left vertical-mirror;
}

Renders


+#-----##
##     +#
|  one   |
#+     ##
##-----#+


+#-----+#
##      ##
|   two   |
##      ##
+#-----+#

A combination of vertical-mirror and horizontal-mirror is not allowed;
the equal effect is produced by clockwise.

My point is mostly about investing on modes in the spec.

Just passing by,

Manos

Received on Friday, 1 March 2002 05:43:28 UTC