Implement rect's geometry properties
In SVG2, x/y/width/height/rx/ry
are now geometry properties instead of attributes.
I think this is a good first bug for learning how to implement new properties, since all the machinery for actually handling their values is already there. Some implementation notes:
- Currently
x/y/width/height/rx/ry
are fields in the Rect struct. - Those fields should get removed. Instead, property_defs should get new definitions, one for each of
x/y/width/height/rx/ry
. -
Rect::make_shape should change so that all of
self.x
/etc. get replaced byvalues.x().0
once the properties machinery knows about these new properties - they will automatically exist inComputedValues
then. However,make_shape
doesn't yet have access to theComputedValues
; it needs a new argument... - ... to be passed from the single place where it is called. Shapes that don't use the values can just ignore them; others like
Ellipse
will find them useful since they got property-fied too.