3 our @ISA = ('AA::Vertex');
7 my $v = AA::Vertex::new($class, $id);
12 $v->DefSet('hint', 0);
13 $v->Bind('y', sub { $v->Get("y0") - 50*$v->Get("h") });
14 $v->{XS} = AA::Label->new("$id-label");
16 'x' => sub { $v->Get('x') },
17 'y' => sub { $v->Get('y') + 80 },
19 'text' => sub { $v->Get('xs') },
21 $v->Get('hint') ? [0,1,0] :
22 $v->Get('xs') ? [1,0,0] : [1,1,1]
33 my ($class, $id, $v, $w) = @_;
34 my $e = AA::new($class, $id);
35 $e->{E} = AA::Edge->new("$id-e", $v, $w);
36 $e->{E}->Set('arrow', 1);
37 $e->{E}->Set('color', [1,0,0]);
41 $e->DefDep('ends', $e->{E}, 'ends');
42 $e->{E}->Bind('width', sub { $e->Get('f') * 5 + 1 });
43 # $e->{E}->Bind('overshoot', sub { $e->Get('f') * 3 + 3});
44 $e->{E}->Bind('arrow-size', sub { $e->Get('f') * 5 + 20});
50 my ($x1, $y1, $x2, $y2) = @{$e->Get('ends')};
52 $cairo->set_source_rgb(0.3, 1, 0);
53 $cairo->set_line_width($e->Get('c') * 5 + 1);
54 $cairo->move_to($x1, $y1);
55 $cairo->line_to($x2, $y2);