- From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
- Date: Mon, 19 Sep 2011 11:39:11 +0200
- To: www-svg <www-svg@w3.org>
- Message-ID: <CAEi838kDZKyRgp6-K=WXVLoMWo4ZgbspXyUrMOanp8Zd2SCX5g@mail.gmail.com>
Hello SVG WG, I don't remember if there is plan for this, but I wonder if it would be possible to have the following feature in SVG2 : An new attribute named "stroke-position" that allow author to specify the way stroke are positioned around a shape. This new attribute could have the following values : - middle : the default value, it act as it is today - inside : the rendered stroke is fully inside the shape - outside : the rendered stroke is fully outside the shape - <value> : the middle of the stroke is moved by the <value> to be rendered. A positive value moved the stroke out of the shape where a negative value move the stroke into the shape Here are some exemples with images to show the expect rendering (the black line is for demonstration purpose only) : <rect width="20" height="20" stroke="red" stroke-width="5" stroke-position="middle" /> [image: stroke-position-middle.png] <rect width="20" height="20" stroke="red" stroke-width="5" stroke-position="inside" /> [image: stroke-position-inside.png] <rect width="20" height="20" stroke="red" stroke-width="5" stroke-position="outside" /> [image: stroke-position-outside.png] <rect width="20" height="20" stroke="red" stroke-width="5" stroke-position="1.5" /> [image: stroke-position-positive-1.5.png] <rect width="20" height="20" stroke="red" stroke-width="5" stroke-position="-1.5" /> [image: stroke-position-negative-1.5.png] I know that there is a question when the shape is not closed (where is the inside/outside of a line ?) In this case, it's possible to relay on the fill-rule attribute to determine this. Thanks :) -- Jeremie ............................. Web : http://jeremie.patonnier.net Twitter : @JeremiePat <http://twitter.com/JeremiePat>
Attachments
- image/png attachment: stroke-position-positive-1.5.png
- image/png attachment: stroke-position-outside.png
- image/png attachment: stroke-position-middle.png
- image/png attachment: stroke-position-negative-1.5.png
- image/png attachment: stroke-position-inside.png
Received on Monday, 19 September 2011 09:40:02 UTC