# Perl module for AttributeSet
# Author: Malay < curiouser@ccmb.res.in>
# You may distribute this module under the same terms as perl itself
# POD documentation - main docs before the code
AttributeSet - Collection of attributes.
$as = Pastel::AttributeSet->new();
$fill_color = Pastel::Color->red();
my $att = Pastel::Attribute->new(-type=>"FILL", -object=>$fill_color);
$as->add_attribute($att);
# Iterate through AttributeSet
while ( $as->has_more() ){
$attribute = $as->get_attribute();
print $attribute->to_svg();
# or get the full thing as SVG
AttributeSet is a collection of Attribute objects.
Malay <curiouser@ccmb.res.in>
package Pastel
::AttributeSet
;
@ISA = qw
(Pastel
::Root
);
Returns an empty AttributeSet object.
# _init is where the heavy stuff will happen when new is called
my ( $self, @args ) = @_;
$self->{attributes
} = [];
push ( @
{ $self->{attributes
} }, $att );