summaryrefslogtreecommitdiff
path: root/lib/Multi/RG.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-11-21 13:19:12 +0100
committerYorhel <git@yorhel.nl>2008-11-21 13:19:12 +0100
commitc3c186d61c316a8aa53f4ebb24e3f049f67984dd (patch)
tree8f2ac93ee4e5bc868a9855059ec91fd4b159920d /lib/Multi/RG.pm
parent8d670e56ad8a8790e53ac0faa4499194ad39bf3d (diff)
Updated relation graph generator with new colours
...these colours look horrible on light skins, need to find a solution to that >.>
Diffstat (limited to 'lib/Multi/RG.pm')
-rw-r--r--lib/Multi/RG.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Multi/RG.pm b/lib/Multi/RG.pm
index 37037a96..d16d63b5 100644
--- a/lib/Multi/RG.pm
+++ b/lib/Multi/RG.pm
@@ -127,10 +127,11 @@ sub builddot {
my $gv =
qq|graph rgraph {\n|.
qq|\tratio = "compress"\n|.
+ qq|\tgraph [ bgcolor="#ffffff00" ]\n|.
qq|\tnode [ fontname = "$_[HEAP]{font}", shape = "plaintext",|.
- qq| fontsize = $_[HEAP]{fsize}[0], style = "setlinewidth(0.5)" ]\n|.
+ qq| fontsize = $_[HEAP]{fsize}[0], style = "setlinewidth(0.5)", fontcolor = "#cccccc", color = "#225588" ]\n|.
qq|\tedge [ labeldistance = 2.5, labelangle = -20, labeljust = 1, minlen = 2, dir = "both",|.
- qq| fontname = $_[HEAP]{font}, fontsize = $_[HEAP]{fsize}[1], arrowsize = 0.7, color = "#69a89a" ]\n|;
+ qq| fontname = $_[HEAP]{font}, fontsize = $_[HEAP]{fsize}[1], arrowsize = 0.7, color = "#225588", fontcolor = "#cccccc" ]\n|;
# insert all nodes, ordered by release date
for (sort { $a->[2] <=> $b->[2] } values %{$_[HEAP]{nodes}}) {
@@ -149,7 +150,7 @@ sub builddot {
$gv .= sprintf
qq|\tv%d [ URL = "/v%d", tooltip = "%s" label=<|.
- q|<TABLE CELLSPACING="0" CELLPADDING="1" BORDER="0" CELLBORDER="1" BGCOLOR="#f0f0f0">|.
+ q|<TABLE CELLSPACING="0" CELLPADDING="1" BORDER="0" CELLBORDER="1" BGCOLOR="#00000033">|.
q|<TR><TD COLSPAN="2" ALIGN="CENTER" CELLPADDING="2"><FONT POINT-SIZE="%d"> %s </FONT></TD></TR>|.
q|<TR><TD> %s </TD><TD> %s </TD></TR>|.
qq|</TABLE>> ]\n|,
@@ -171,9 +172,9 @@ sub builddot {
}
my $label =
- $VNDB::VRELW->{$_->[2]} ? qq|headlabel = "$VNDB::VREL->[$_->[2]]", taillabel = "$VNDB::VREL->[$_->[2]-1]"| :
- $VNDB::VRELW->{$_->[2]+1} ? qq|headlabel = "$VNDB::VREL->[$_->[2]]", taillabel = "$VNDB::VREL->[$_->[2]+1]"|
- : qq|label = " $VNDB::VREL->[$_->[2]]"|;
+ $VNDB::S{vn_relations}[$_->[2]][1] ? qq|headlabel = "$VNDB::S{vn_relations}[$_->[2]][0]", taillabel = "$VNDB::S{vn_relations}[$_->[2]-1][0]"| :
+ $VNDB::S{vn_relations}[$_->[2]+1][1] ? qq|headlabel = "$VNDB::S{vn_relations}[$_->[2]][0]", taillabel = "$VNDB::S{vn_relations}[$_->[2]+1][0]"|
+ : qq|label = " $VNDB::S{vn_relations}[$_->[2]][0]"|;
$gv .= qq|\tv$$_[1] -- v$$_[0] [ $label ]\n|;
}
@@ -269,7 +270,7 @@ sub proc_child {
# Not a POE handler, just a small macro
sub reverserel { # relation
- return $VNDB::VRELW->{$_[0]} ? $_[0]-1 : $VNDB::VRELW->{$_[0]+1} ? $_[0]+1 : $_[0];
+ return $VNDB::S{vn_relations}[$_[0]][1] ? $_[0]-1 : $VNDB::S{vn_relations}[$_[0]+1][1] ? $_[0]+1 : $_[0];
}