Re: pieslice

OK, I'd certainly agree specialized symbol libraries belong in linked files,
which allow for extension, customization, and standardization for all who use
the linked files. 

I suppose the W3C might want to maintain a library of standard files that
define features of common shapes, fills, strokes, patterns, effects. It would
allow users to share such definitions regardless of which vendor's program
they use. Vendors or users could submit their files to the standards body so
new features could be included in future standards. Such library files would
need a way to indicate the version of SVG that they are written for, as well
as the version of the library file itself, such as svgversion="1.0"
libversion="2.1".

However, I'd still prefer a small number of additional standard shapes,
because they are commonly offered in many graphics programs.

Here is a concrete suggestion for a regular polygon, based on the syntax for a
circle. It is inscribed in a circle of center (cx, cy) and radius r, has n
sides, n points, all interior angles are theta = (360deg / n), and the first
point is at an angle a = 90deg.

	<regpoly style="fill: blue; stroke: silver;" cx="2.5cm" cy="2.5cm" r="1cm"
n="8" a="30" />

Angle a is in degrees by default, but may be specified thus: 30deg, with no
space between the number and the units. It may also be expressed in radians as
a="pi/6", where pi is predefined. Default values may be omitted and are n="3"
and a="0". N is an integer with a minimum value of 3 and a maximum of 360. A
is a floating point number and has a range of 0 to 360 degrees.

Here is a concrete suggestion for a regular starburst, which extends the
regular polygon above.

	<starburst style="fill: yellow; stroke: red;" cx="5cm" cy="2.5cm" r="1cm"
n="24" a="pi/10" teethdepth="10%" />

Teethdepth is a percentage value, from 0 to 100% of the radius. Its default
value might be 10%.

Now, about that bevel, isn't it easiest just to say it's a CSS value for the
border-style? However, that would not allow for shadows. For example, a
suggestion:

	<rect style="fill: #99CCCC; stroke: black; border-style=outset;" x="3em"
y="3em" width="10em" height="2em" xround="1em" yround="1em" />
	<text style="text-align: center; color: #0080FF; background: transparent;"
x="3em" y="4.5em">SVG or Bust!</text>

(Uh, suppose I want that text centered across the button. How do I define a
box for the text to center in? That is, can I give the text's box a width and
height?

See, that was the easy part. The hard part is getting compliant, bug-free
browsers and applications, not to mention valid pages written with the stuff!
;-)

Can't wait to actually use the stuff, but hope it's supported better than CSS
is currently. *Sigh*.

Enthusiastically,
Ben Whisman
MWhisman@aol.com

Received on Thursday, 25 February 1999 19:04:14 UTC