| 1 | package SVG::DOM2::Element::Line; | ||
| 2 | |||
| 3 | use base "SVG::DOM2::Element::Shape"; | ||
| 4 | use base "SVG::DOM2::Element::Shape::Fill"; | ||
| 5 | use base "SVG::DOM2::Element::Shape::Stroke"; | ||
| 6 | |||
| 7 | sub new | ||
| 8 | { | ||
| 9 | my ($proto, %args) = @_; | ||
| 10 | return $proto->SUPER::new('line', %args); | ||
| 11 | } | ||
| 12 | |||
| 13 | sub attr | ||
| 14 | { | ||
| 15 | my ($self, $name, $set) = @_; | ||
| 16 | $self->setAttribute($name, $set) if defined($set); | ||
| 17 | return $self->getAttribute($name); | ||
| 18 | } | ||
| 19 | |||
| 20 | sub x1 { shift->attr('x1', @_); } | ||
| 21 | sub y1 { shift->attr('y1', @_); } | ||
| 22 | sub x2 { shift->attr('x2', @_); } | ||
| 23 | sub y2 { shift->attr('y2', @_); } | ||
| 24 | |||
| 25 | return 1; |