[system] / trunk / pg / lib / Value / Point.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Value/Point.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2579 Revision 2592
176# Generate the various output formats 176# Generate the various output formats
177# 177#
178 178
179sub stringify { 179sub stringify {
180 my $self = shift; 180 my $self = shift;
181 my $point = $$Value::context->lists->get('Point'); 181 my $open = $self->{open} || $$Value::context->lists->get('Point')->{open};
182 my $close = $self->{close} || $$Value::context->lists->get('Point')->{close};
182 $point->{open} . join(',',@{$self->data}) . $point->{close}; 183 $open . join(',',@{$self->data}) . $close;
183} 184}
184 185
185sub string { 186sub string {
186 my $self = shift; my $equation = shift; 187 my $self = shift; my $equation = shift;
187 my $open = shift || $$Value::context->lists->get('Point')->{open}; 188 my $open = shift || $$Value::context->lists->get('Point')->{open};
191 if (Value::isValue($x)) {push(@coords,$x->string($equation))} else {push(@coords,$x)} 192 if (Value::isValue($x)) {push(@coords,$x->string($equation))} else {push(@coords,$x)}
192 } 193 }
193 return $open.join(',',@coords).$close; 194 return $open.join(',',@coords).$close;
194} 195}
195 196
196sub string { 197sub TeX {
197 my $self = shift; my $equation = shift; 198 my $self = shift; my $equation = shift;
198 my $open = shift || $$Value::context->lists->get('Point')->{open}; 199 my $open = shift || $$Value::context->lists->get('Point')->{open};
199 my $close = shift || $$Value::context->lists->get('Point')->{close}; 200 my $close = shift || $$Value::context->lists->get('Point')->{close};
200 my @coords = (); 201 my @coords = ();
201 foreach my $x (@{$self->data}) { 202 foreach my $x (@{$self->data}) {

Legend:
Removed from v.2579  
changed lines
  Added in v.2592

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9