<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package GD::Group;

# Simple object for recursive grouping. Does absolutely nothing with GD,
# but works nicely with GD::SVG.

use strict;

our $AUTOLOAD;
our $VERSION = 1.00;

sub AUTOLOAD {
    my ($pack,$func_name) = $AUTOLOAD =~ /(.+)::([^:]+)$/;
    my $this = shift;
    $this-&gt;{gd}-&gt;currentGroup($this-&gt;{group});
    $this-&gt;{gd}-&gt;$func_name(@_);
}

sub new {
    my $this        = shift;
    my ($gd,$group) = @_;
    return bless {gd    =&gt; $gd,
		  group =&gt; $group},ref $this || $this;
}

sub DESTROY {
    my $this = shift;
    my $gd   = $this-&gt;{gd};
    my $grp  = $this-&gt;{group};
    $gd-&gt;endGroup($grp);
}


1;
</pre></body></html>