protected void buildShape(BridgeContext ctx,
Element e,
ShapeNode shapeNode) {
try {
SVGOMLineElement le = (SVGOMLineElement) e;
// 'x1' attribute - default is 0
AbstractSVGAnimatedLength _x1 =
(AbstractSVGAnimatedLength) le.getX1();
float x1 = _x1.getCheckedValue();
// 'y1' attribute - default is 0
AbstractSVGAnimatedLength _y1 =
(AbstractSVGAnimatedLength) le.getY1();
float y1 = _y1.getCheckedValue();
// 'x2' attribute - default is 0
AbstractSVGAnimatedLength _x2 =
(AbstractSVGAnimatedLength) le.getX2();
float x2 = _x2.getCheckedValue();
// 'y2' attribute - default is 0
AbstractSVGAnimatedLength _y2 =
(AbstractSVGAnimatedLength) le.getY2();
float y2 = _y2.getCheckedValue();
shapeNode.setShape(new Line2D.Float(x1, y1, x2, y2));
} catch (LiveAttributeException ex) {
throw new BridgeException(ctx, ex);