protected void buildShape(BridgeContext ctx,
Element e,
ShapeNode shapeNode) {
try {
SVGOMRectElement re = (SVGOMRectElement) e;
// 'x' attribute - default is 0
AbstractSVGAnimatedLength _x =
(AbstractSVGAnimatedLength) re.getX();
float x = _x.getCheckedValue();
// 'y' attribute - default is 0
AbstractSVGAnimatedLength _y =
(AbstractSVGAnimatedLength) re.getY();
float y = _y.getCheckedValue();
// 'width' attribute - required
AbstractSVGAnimatedLength _width =
(AbstractSVGAnimatedLength) re.getWidth();
float w = _width.getCheckedValue();
// 'height' attribute - required
AbstractSVGAnimatedLength _height =
(AbstractSVGAnimatedLength) re.getHeight();
float h = _height.getCheckedValue();
// 'rx' attribute - default is 0
AbstractSVGAnimatedLength _rx =
(AbstractSVGAnimatedLength) re.getRx();
float rx = _rx.getCheckedValue();
if (rx > w / 2) {
rx = w / 2;
}
// 'ry' attribute - default is rx
AbstractSVGAnimatedLength _ry =
(AbstractSVGAnimatedLength) re.getRy();
float ry = _ry.getCheckedValue();
if (ry > h / 2) {
ry = h / 2;
}