W3C home > Mailing lists > Public > www-style@w3.org > March 2002

RE: RFC: ability to assign images to corners

From: Manos Batsis <m.batsis@bsnet.gr>
Date: Fri, 1 Mar 2002 12:42:53 +0200
Message-ID: <E657D8576967CF448D6AF22CB42DD2690FF229@ermhs.Athens.BrokerSystems.gr>
To: "Bert Bos" <bert@w3.org>
Cc: <www-style@w3.org>


> -----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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:13 GMT