~ubuntu-branches/ubuntu/lucid/pdl/lucid

« back to all changes in this revision

Viewing changes to Graphics/TriD/TriD/TextObjects.pm

  • Committer: Bazaar Package Importer
  • Author(s): Ben Gertzfield
  • Date: 2002-04-08 18:47:16 UTC
  • Revision ID: james.westby@ubuntu.com-20020408184716-0hf64dc96kin3htp
Tags: upstream-2.3.2
ImportĀ upstreamĀ versionĀ 2.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# These objects contain textual descriptions of the graph.
 
2
# Placed suitably in relation to origin to be used with a graph.
 
3
 
 
4
package PDL::Graphics::TriD::Description;
 
5
 
 
6
@ISA=qw/PDL::Graphics::TriD::Object/;
 
7
 
 
8
sub new {
 
9
        my($type,$text) = @_;
 
10
        local $_ = $text;
 
11
        s/\\/\\\\/g;
 
12
        s/"/\\"/g;
 
13
        my $this = bless {
 
14
                TText => "[".(join ',',map {"\"$_\""} split "\n",$_)."]"
 
15
        },$type;
 
16
        return $this;
 
17
}
 
18
 
 
19
1;