Treex/Core/TredView/Styles.pm

filter: Statementstmt 10.3% 17 / 165 Branchbran 0.0% 0 / 78 Conditioncond 0.0% 0 / 47 MC/DCmcdc 0.0% 0 / 26 Subroutinesub 28.5% 4 / 14 Podpod 100% 3 / 3 totaltotal 7.2% 24 / 333 CC 60 SCAR 59.3
CC
60
Cov
6%
draw_arrows
702.0
_tnode_style
420.0
_pnode_style
72.0
CRAP 376.2
« Treex/Core/ScenarioParser.pm ↑ Summary Treex/Core/Coordination.pm »
1 package Treex::Core::TredView::Styles;
2 2 $Treex::Core::TredView::Styles::VERSION = '2.20151210';
3 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Treex::Core::Log;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Treex::Core::TredView::Colors;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Treex::Core::TredView::LineStyles;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 2 has '_treex_doc' => (
10 is => 'ro',
11 isa => 'Treex::Core::Document',
12 weak_ref => 1,
13 required => 1
14 );
15 has '_colors' => (
16 is => 'ro',
17 isa => 'Treex::Core::TredView::Colors',
18 0 ▶ default => sub { Treex::Core::TredView::Colors->new() }
Subroutine __ANON__: not called CC=1 SCAR=6.9
19 2 );
20  
21 has '_line_styles' => (
22 is => 'ro',
23 isa => 'Treex::Core::TredView::LineStyles',
24 0 ▶ default => sub { Treex::Core::TredView::LineStyles->new() }
Subroutine __ANON__: not called CC=1 SCAR=6.9
25 2 );
26  
27 sub _is_coord {
28 0 ▶ my ( $self, $node ) = @_;
Subroutine _is_coord: not called CC=3 SCAR=24.8
29 0 ▶ return 0 if $node->get_layer ne 't';
Branch: 1 branch
BranchTrueFalseTotal
if $node->get_layer ne "t" 0 0 0
30 0 ▶ return ( $node->{functor} and $node->{functor} =~ /^(?:ADVS|APPS|CONFR|CONJ|CONTRA|CSQ|DISJ|GRAD|OPER|REAS)$/ );
Condition0%0/3
$node->{'functor'} && $node->{'functor'} =~ /^(?:ADVS|APPS|CONFR|CONJ|CONTRA|CSQ|DISJ|GRAD|OPER|REAS)$/
!ll&&!rl&&r
000
MC/DC0%0/2
$node->{'functor'} && $node->{'functor'} =~ /^(?:ADVS|APPS|CONFR|CONJ|CONTRA|CSQ|DISJ|GRAD|OPER|REAS)$/
$node->{'functor'} $node->{'functor'} =~ /^(?:ADVS|APPS|CONFR|CONJ|CONTRA|CSQ|DISJ|GRAD|OPER|REAS)$/
Truth table0%0/3
A && B
A= $node->{'functor'}B= $node->{'functor'} =~ /^(?:ADVS|APPS|CONFR|CONJ|CONTRA|CSQ|DISJ|GRAD|OPER|REAS)$/
ABresult
0X0
100
111
31 }
32  
33 sub bundle_style {
34 0 ▶ my $self = shift;
Subroutine bundle_style: not called CC=1 SCAR=6.9
Pod documented
35 0 my $style = '#{nodeXSkip:10}#{nodeYSkip:5}#{lineSpacing:0.9}#{balance:0}';
36 0 $style .= '#{Node-width:7}#{Node-height:7}#{Node-currentwidth:10}#{Node-currentheight:10}';
37 0 $style .= '#{CurrentOval-width:3}#{CurrentOval-outline:' . $self->_colors->get('current') . '}';
38 0 $style .= '#{Line-fill:' . $self->_colors->get('edge') . '}#{Line-width:2}';
39  
40 0 return $style;
41 }
42  
43 sub node_style {
44 0 ▶ my ( $self, $node ) = @_;
Subroutine node_style: not called CC=3 SCAR=24.8
Pod documented
45 0 my $styles = '';
46  
47 0 ▶ if ( $node->is_root() ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->is_root) 0 0 0
48 0 $styles .= '#{Node-rellevel:' . $node->{'_shift_down'} . '}';
49 }
50  
51 0 my $layer = $node->get_layer;
52 0 my %subs;
53 0 $subs{t} = \&_tnode_style;
54 0 $subs{a} = \&_anode_style;
55 0 $subs{n} = \&_nnode_style;
56 0 $subs{p} = \&_pnode_style;
57  
58 0 ▶ if ( defined $subs{$layer} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $subs{$layer}) { } 0 0 0
59 0 return $styles . &{ $subs{$layer} }( $self, $node );
60 }
61 else {
62 0 log_fatal "Undefined or unknown layer: $layer";
63 }
64 }
65  
66 sub _anode_style {
67 0 ▶ my ( $self, $node ) = @_;
Subroutine _anode_style: not called CC=5 SCAR=34.0
68 0 ▶ my $linestyle = $node->wild->{changed} ? '#{Line-width:5}' : '';
Branch: 1 branch
BranchTrueFalseTotal
$node->wild->{'changed'} ? : 0 0 0
69 0 ▶ $linestyle .= '#{Line-width:5}' if $node->wild->{joined};
Branch: 1 branch
BranchTrueFalseTotal
if $node->wild->{"joined"} 0 0 0
70 0 ▶ $linestyle .= '#{Line-fill:#ff0000}' if $node->wild->{unchangeable};
Branch: 1 branch
BranchTrueFalseTotal
if $node->wild->{"unchangeable"} 0 0 0
71 0 ▶ if ( $node->clause_number ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->clause_number) 0 0 0
72 0 my $clr = $self->_colors->get_clause_color( $node->clause_number );
73 0 return '#{Oval-fill:' . $clr . '}' . '#{Line-fill:' . $clr . '}' . $linestyle;
74 }
75 0 return '#{Oval-fill:' . $self->_colors->get('anode') . '}' . $linestyle;
76 }
77  
78 sub _tnode_style {
79 0 ▶ my ( $self, $node ) = @_;
Subroutine _tnode_style: not called CC=20 SCAR=60.4
80  
81 0 my $style = '#{Oval-fill:' . $self->_colors->get('tnode') . '}';
82 0 ▶ return $style if $node->is_root;
Branch: 1 branch
BranchTrueFalseTotal
if $node->is_root 0 0 0
83  
84 0 ▶ $style .= '#{Node-shape:' . ( $node->{is_generated} ? 'rectangle' : 'oval' ) . '}';
Branch: 1 branch
BranchTrueFalseTotal
$node->{'is_generated'} ? : 0 0 0
85  
86 0 my $coord_circle = '#{Line-decoration:shape=oval;coords=-20,-20,20,20;outline=' . $self->_colors->get('coord') . ';width=1;dash=5,5 }';
87 0 $coord_circle .= '#{Line-arrow:&}#{Line-arrowshape:&}#{Line-dash:&}';
88 0 $coord_circle .= '#{Line-tag:&}#{Line-smooth:&}#{Oval-fill:' . $self->_colors->get('tnode_coord') . '}';
89  
90 # For coordination roots
91 0 my $k1 = '20 / sqrt((xp-xn)**2 + (yp-yn)**2)';
92 0 my $x1 = 'xn-(xn-xp)*' . $k1;
93 0 my $y1 = 'yn-(yn-yp)*' . $k1;
94  
95 # For coordination members
96 0 my $k2 = '(1 - 20 / sqrt((xp-xn)**2 + (yp-yn)**2))';
97 0 my $x2 = 'xn-(xn-xp)*' . $k2;
98 0 my $y2 = 'yn-(yn-yp)*' . $k2;
99  
100 0 my $line_width = 2;
101 0 my $line_color = $self->_colors->get('edge');
102 0 my $line_coords;
103 my $line_dash;
104  
105 0 ▶ if ($node->{is_member}) {
Branch: 3 branches
BranchTrueFalseTotal
if ($node->{'is_member'}) { } 0 0 0
elsif (not $node->is_root and $self->_is_coord($node->parent)) { } 0 0 0
elsif ($self->_is_coord($node)) { } 0 0 0
106 0 ▶ if (not $node->is_root and $self->_is_coord($node->parent)) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $node->is_root and $self->_is_coord($node->parent)) { } 0 0 0
Condition0%0/3
not $node->is_root and $self->_is_coord($node->parent)
!ll&&!rl&&r
000
MC/DC0%0/2
not $node->is_root and $self->_is_coord($node->parent)
not $node->is_root $self->_is_coord($node->parent)
Truth table0%0/3
not(A) and B
A= not $node->is_rootB= $self->_is_coord($node->parent)
ABresult
0X0
100
111
107 0 $line_width = 1;
108 0 $line_color = $self->_colors->get('coord');
109 } else {
110 0 $line_color = $self->_colors->get('error');
111 }
112 ▶ } elsif (not $node->is_root and $self->_is_coord($node->parent)) {
Condition0%0/3
not $node->is_root and $self->_is_coord($node->parent)
!ll&&!rl&&r
000
MC/DC0%0/2
not $node->is_root and $self->_is_coord($node->parent)
not $node->is_root $self->_is_coord($node->parent)
Truth table0%0/3
not(A) and B
A= not $node->is_rootB= $self->_is_coord($node->parent)
ABresult
0X0
100
111
113 0 $line_color = $self->_colors->get('coord_mod');
114 } elsif ($self->_is_coord($node)) {
115 0 $line_color = $self->_colors->get('coord');
116 0 $line_width = 1;
117 }
118  
119 0 ▶ if (($node->{functor} and $node->{functor} =~ m/^(?:PAR|PARTL|VOCAT|RHEM|CM|FPHR|PREC)$/) or (not $node->is_root and $node->parent->is_root)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"functor"} and $node->{"functor"} =~ /^(?:PAR|PARTL|VOCAT|RHEM|CM|FPHR|PREC)$/ or not $node->is_root and $node->parent->is_root) 0 0 0
Condition0%0/9
$node->{"functor"} and $node->{"functor"} =~ /^(?:PAR|PARTL|VOCAT|RHEM|CM|FPHR|PREC)$/ or not $node->is_root and $node->parent->is_root
l!l&&r!l&&!r
000
$node->{"functor"} and $node->{"functor"} =~ /^(?:PAR|PARTL|VOCAT|RHEM|CM|FPHR|PREC)$/
!ll&&!rl&&r
000
not $node->is_root and $node->parent->is_root
!ll&&!rl&&r
000
MC/DC0%0/4
$node->{"functor"} and $node->{"functor"} =~ /^(?:PAR|PARTL|VOCAT|RHEM|CM|FPHR|PREC)$/ or not $node->is_root and $node->parent->is_root
$node->{"functor"} $node->{"functor"} =~ /^(?:PAR|PARTL|VOCAT|RHEM|CM|FPHR|PREC)$/ not $node->is_root $node->parent->is_root
Truth table0%0/7
A and B or not(C) and D
A= $node->{"functor"}B= $node->{"functor"} =~ /^(?:PAR|PARTL|VOCAT|RHEM|CM|FPHR|PREC)$/C= not $node->is_rootD= $node->parent->is_root
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
120 0 $line_width = 1;
121 0 $line_dash = '2,4';
122 0 $line_color = $self->_colors->get('edge');
123 }
124  
125 0 ▶ if ($self->_is_coord($node)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_is_coord($node)) { } 0 0 0
126 0 $line_coords = "n,n,n,n&$x1,$y1";
127 0 $line_width = '0&'.$line_width;
128 0 $line_color = 'white&'.$line_color;
129 0 ▶ $line_dash = '&'.$line_dash if $line_dash;
Branch: 1 branch
BranchTrueFalseTotal
if $line_dash 0 0 0
130 } else {
131 0 $line_coords = 'n,n';
132 }
133  
134 0 ▶ if (not $node->is_root and $self->_is_coord($node->parent)) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $node->is_root and $self->_is_coord($node->parent)) { } 0 0 0
Condition0%0/3
not $node->is_root and $self->_is_coord($node->parent)
!ll&&!rl&&r
000
MC/DC0%0/2
not $node->is_root and $self->_is_coord($node->parent)
not $node->is_root $self->_is_coord($node->parent)
Truth table0%0/3
not(A) and B
A= not $node->is_rootB= $self->_is_coord($node->parent)
ABresult
0X0
100
111
135 0 $line_coords .= ",$x2,$y2";
136 } else {
137 0 $line_coords .= ',p,p';
138 }
139
140 0 ▶ $style .= $coord_circle if $self->_is_coord($node);
Branch: 1 branch
BranchTrueFalseTotal
if $self->_is_coord($node) 0 0 0
141 0 $style .= "#{Line-width:$line_width}#{Line-fill:$line_color}#{Line-coords:$line_coords}";
142 0 ▶ $style .= "#{Line-dash:$line_dash}" if $line_dash;
Branch: 1 branch
BranchTrueFalseTotal
if $line_dash 0 0 0
143 0 ▶ $style .= '#{Oval-fill:#00ff00}' if $node->wild->{ali_root};
Branch: 1 branch
BranchTrueFalseTotal
if $node->wild->{"ali_root"} 0 0 0
144 0 return $style;
145 }
146  
147 sub _nnode_style {
148 0 ▶ my ( $self, $node ) = @_;
Subroutine _nnode_style: not called CC=1 SCAR=6.9
149 0 return '#{Oval-fill:' . $self->_colors->get('nnode') . '}';
150 }
151  
152 sub _pnode_style {
153 0 ▶ my ( $self, $node ) = @_;
Subroutine _pnode_style: not called CC=8 SCAR=42.8
154  
155 0 my $terminal = $node->is_leaf;
156  
157 0 my $style = '#{Line-coords:n,n,n,p,p,p}';
158 0 $style .= '#{nodeXSkip:4}#{nodeYSkip:0}#{NodeLabel-skipempty:1}';
159 0 $style .= '#{NodeLabel-halign:center}#{Node-textalign:center}';
160  
161 0 ▶ if ($terminal) {
Branch: 1 branch
BranchTrueFalseTotal
if ($terminal) 0 0 0
162 0 my $shift = $node->root->{_tree_depth} - $node->{_depth};
163 0 $style .= "#{Node-rellevel:$shift}";
164 }
165  
166 0 ▶ if ( not $node->is_root and scalar( $node->parent->children ) == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $node->is_root and scalar $node->parent->children == 1) 0 0 0
Condition0%0/3
not $node->is_root and scalar $node->parent->children == 1
!ll&&!rl&&r
000
MC/DC0%0/2
not $node->is_root and scalar $node->parent->children == 1
not $node->is_root scalar $node->parent->children == 1
Truth table0%0/3
not(A) and B
A= not $node->is_rootB= scalar $node->parent->children == 1
ABresult
0X0
100
111
167 0 $style .= '#{Node-addafterskip:15}';
168 }
169  
170 0 ▶ if ( not $terminal ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $terminal) { } 0 0 0
171 0 ▶ $style .= '#{Oval-fill:' . ( $node->{is_head} ? $self->_colors->get('nonterminal_head') : $self->_colors->get('nonterminal') ) . '}';
Branch: 1 branch
BranchTrueFalseTotal
$node->{'is_head'} ? : 0 0 0
172 0 $style .= '#{Node-shape:rectangle}#{CurrentOval-outline:' . $self->_colors->get('current') . '}';
173 0 $style .= '#{CurrentOval-width:2}#{Node-surroundtext:1}#{NodeLabel-valign:center}';
174 }
175 else {
176 0 $style .= '#{Line-dash:.}';
177 0 ▶ my $ctype = $node->tag eq '-NONE-' ? 'trace'
Branch: 2 branches
BranchTrueFalseTotal
$node->tag eq '-NONE-' ? : 0 0 0
$node->is_head ? : 0 0 0
178 : $node->is_head ? 'terminal_head'
179 : 'terminal';
180 0 $style .= '#{Oval-fill:' . $self->_colors->get($ctype) . '}';
181 }
182  
183 0 return $style;
184 }
185  
186 # based on DrawCorefArrows from config/TectoMT_TredMacros.mak, simplified
187 # ignoring special values ex and segm
188 sub draw_arrows {
189 0 ▶ my ( $self, $node, $styles, $line, $target_ids, $arrow_types ) = @_;
Subroutine draw_arrows: not called CC=26 SCAR=65.5
Pod documented
190 0 my ( @coords, @colors, @dash, @tags );
191 0 my ( $rotate_prv_snt, $rotate_nxt_snt, $rotate_dfr_doc ) = ( 0, 0, 0 );
192  
193 0 foreach my $target_id (@$target_ids) {
194 0 ▶ next if !defined $target_ids || $target_id eq ""; # skip blank IDs
Branch: 1 branch
BranchTrueFalseTotal
if not defined $target_ids or $target_id eq "" 0 0 0
Condition0%0/3
not defined $target_ids or $target_id eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $target_ids or $target_id eq ""
not defined $target_ids $target_id eq ""
Truth table0%0/3
not(A) or B
A= not defined $target_idsB= $target_id eq ""
ABresult
1X1
011
000
195 # some alignment links do not have their type filled, default to generic alignment
196 0 ▶ my $arrow_type = shift @$arrow_types // 'alignment';
Condition0%0/2
shift @$arrow_types // "alignment"
l!l
00
MC/DC0%0/1
shift @$arrow_types // "alignment"
shift @$arrow_types
Truth table0%0/2
A
A= shift @$arrow_types
Aresult
11
00
197  
198 my $target_node
199 0 = eval { $self->_treex_doc->get_node_by_id($target_id) };
200 0 ▶ if ($target_node) {
Branch: 1 branch
BranchTrueFalseTotal
if ($target_node) { } 0 0 0
201 0 ▶ if ( $node->get_bundle eq $target_node->get_bundle ) { # same sentence
Branch: 1 branch
BranchTrueFalseTotal
if ($node->get_bundle eq $target_node->get_bundle) { } 0 0 0
202  
203 0 my $T = "[?\$node->{id} eq '$target_id'?]";
204 0 my $X = "(x$T-xn)";
205 0 my $Y = "(y$T-yn)";
206 0 my $D = "sqrt($X**2+$Y**2)";
207 0 my $BX = 'n';
208 0 my $BY = 'n';
209 0 my $MX = "((x$T+xn)/2 - $Y*(25/$D+0.12))";
210 0 my $MY = "((y$T+yn)/2 + $X*(25/$D+0.12))";
211 0 my $EX = "x$T";
212 0 my $EY = "y$T";
213 0 my $K1 = "20 / sqrt(($MX-xn)**2 + ($MY-yn)**2)";
214 0 my $K2 = "20 / sqrt((x$T-$MX)**2 + (y$T-$MY)**2)";
215  
216 0 ▶ if ( $self->_is_coord($node) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_is_coord($node)) 0 0 0
217 0 $BX = "xn-(xn-$MX)*$K1";
218 0 $BY = "yn-(yn-$MY)*$K1";
219 }
220 0 ▶ if ( $self->_is_coord($target_node) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_is_coord($target_node)) 0 0 0
221 0 $EX = "x$T+($MX-x$T)*$K2";
222 0 $EY = "y$T+($MY-y$T)*$K2";
223 }
224 0 ▶ if ( $arrow_type eq 'coindex' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($arrow_type eq "coindex") 0 0 0
225 0 $MX = "((x$T+xn)/2 + $Y*(25/$D+0.12))";
226 0 $MY = "((y$T+6+yn)/2 - $X*(25/$D+0.12))";
227 0 $EY = "y$T+6";
228 }
229  
230 0 push @coords, "$BX,$BY,$MX,$MY,$EX,$EY";
231 }
232 else { # should be always the same document, if it exists at all
233  
234 0 my $orientation = $target_node->get_bundle->get_position - $node->get_bundle->get_position;
235 0 ▶ $orientation = $orientation > 0 ? 'right' : 'left';
Branch: 1 branch
BranchTrueFalseTotal
$orientation > 0 ? : 0 0 0
236 0 ▶ if ( $orientation =~ /left|right/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($orientation =~ /left|right/) 0 0 0
237 0 ▶ if ( $orientation eq 'left' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($orientation eq 'left') { } 0 0 0
238 0 ▶ log_info "ref-arrows: Preceding sentence\n" if $main::macroDebug;
Branch: 1 branch
BranchTrueFalseTotal
if $main::macroDebug 0 0 0
239 0 push @coords, "n,n,n-30,n+$rotate_prv_snt";
240 0 $rotate_prv_snt += 10;
241 }
242 else { #right
243 0 ▶ log_info "ref-arrows: Following sentence\n" if $main::macroDebug;
Branch: 1 branch
BranchTrueFalseTotal
if $main::macroDebug 0 0 0
244 0 push @coords, "n,n,n+30,n+$rotate_nxt_snt";
245 0 $rotate_nxt_snt += 10;
246 }
247 }
248 }
249 }
250 else {
251 0 ▶ log_info "ref-arrows: Not found!\n" if $main::macroDebug;
Branch: 1 branch
BranchTrueFalseTotal
if $main::macroDebug 0 0 0
252 0 push @coords, "n,n,n+$rotate_dfr_doc,n-25";
253 0 $rotate_dfr_doc += 10;
254 }
255  
256 0 push @tags, $arrow_type;
257 0 push @colors, ( $self->_colors->get($arrow_type) );
258 0 push @dash, ( $self->_line_styles->dash_style($arrow_type) );
259 }
260  
261 0 ▶ $line->{-coords} ||= 'n,n,p,p';
Condition0%0/2
$line->{"-coords"} ||= "n,n,p,p"
l!l
00
MC/DC0%0/1
$line->{"-coords"} ||= "n,n,p,p"
$line->{"-coords"}
Truth table0%0/2
A
A= $line->{"-coords"}
Aresult
11
00
262  
263 0 ▶ if (@coords) {
Branch: 1 branch
BranchTrueFalseTotal
if (@coords) 0 0 0
264 TredMacro::AddStyle(
265 $styles, 'Line',
266 -coords => ( $line->{-coords} || '' ) . '&' . join( '&', @coords ),
267 -arrow => ( $line->{-arrow} || '' ) . ( '&last' x @coords ),
268 -arrowshape => ( $line->{-arrowshape} || '' ) . ( '&16,18,3' x @coords ),
269 -dash => ( $line->{-dash} || '' ) . '&' . join( '&', @dash ),
270 -width => ( $line->{-width} || '' ) . ( '&1' x @coords ),
271 -fill => ( $line->{-fill} || '' ) . '&' . join( '&', @colors ),
272 -tag => ( $line->{-tag} || '' ) . '&' . join( '&', @tags ),
273 0 ▶ -smooth => ( $line->{-smooth} || '' ) . ( '&1' x @coords )
Condition0%0/16
$line->{'-coords'} || ''
l!l
00
$line->{'-arrow'} || ''
l!l
00
$line->{'-arrowshape'} || ''
l!l
00
$line->{'-dash'} || ''
l!l
00
$line->{'-width'} || ''
l!l
00
$line->{'-fill'} || ''
l!l
00
$line->{'-tag'} || ''
l!l
00
$line->{'-smooth'} || ''
l!l
00
MC/DC0%0/1
$line->{'-coords'} || ''
$line->{'-coords'}
MC/DC0%0/1
$line->{'-arrow'} || ''
$line->{'-arrow'}
MC/DC0%0/1
$line->{'-arrowshape'} || ''
$line->{'-arrowshape'}
MC/DC0%0/1
$line->{'-dash'} || ''
$line->{'-dash'}
MC/DC0%0/1
$line->{'-width'} || ''
$line->{'-width'}
MC/DC0%0/1
$line->{'-fill'} || ''
$line->{'-fill'}
MC/DC0%0/1
$line->{'-tag'} || ''
$line->{'-tag'}
MC/DC0%0/1
$line->{'-smooth'} || ''
$line->{'-smooth'}
Truth table0%0/2
A
A= $line->{'-coords'}
Aresult
11
00
Truth table0%0/2
A
A= $line->{'-arrow'}
Aresult
11
00
Truth table0%0/2
A
A= $line->{'-arrowshape'}
Aresult
11
00
Truth table0%0/2
A
A= $line->{'-dash'}
Aresult
11
00
Truth table0%0/2
A
A= $line->{'-width'}
Aresult
11
00
Truth table0%0/2
A
A= $line->{'-fill'}
Aresult
11
00
Truth table0%0/2
A
A= $line->{'-tag'}
Aresult
11
00
Truth table0%0/2
A
A= $line->{'-smooth'}
Aresult
11
00
274 );
275 }
276 0 return;
277 }
278  
279 2 1;
280  
281 __END__
282  
283 =pod
284  
285 =encoding utf-8
286  
287 =head1 NAME
288  
289 Treex::Core::TredView::Styles - Styling of trees in Tred (how they look)
290  
291 =head1 VERSION
292  
293 version 2.20151210
294  
295 =head1 DESCRIPTION
296  
297 This packages provides styling for the trees displayed in Tred.
298  
299 =head1 METHODS
300  
301 =head2 Public methods
302  
303 =over 4
304  
305 =item bundle_style
306  
307 =item node_style
308  
309 =item draw_arrows
310  
311 =back
312  
313 =head2 Private methods
314  
315 =over 4
316  
317 =item _anode_style
318  
319 =item _tnode_style
320  
321 =item _nnode_style
322  
323 =item _pnode_style
324  
325 =back
326  
327 =head1 AUTHOR
328  
329 Josef Toman <toman@ufal.mff.cuni.cz>
330  
331 =head1 COPYRIGHT AND LICENSE
332  
333 Copyright © 2011-2012 by Institute of Formal and Applied Linguistics, Charles University in Prague
334  
335 This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
« Treex/Core/ScenarioParser.pm ↑ Summary Treex/Core/Coordination.pm »