File: TextObjects.pm

package info (click to toggle)
libpdl-graphics-trid-perl 2.102-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 480 kB
  • sloc: perl: 5,082; ansic: 683; makefile: 6
file content (22 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# These objects contain textual descriptions of the graph.
# Placed suitably in relation to origin to be used with a graph.

package PDL::Graphics::TriD::Description;

use strict;
use warnings;

our @ISA=qw/PDL::Graphics::TriD::Object/;

sub new {
	my($type,$text) = @_;
	local $_ = $text;
	s/\\/\\\\/g;
	s/"/\\"/g;
	my $this = bless {
		TText => "[".(join ',',map {"\"$_\""} split "\n",$_)."]"
	},$type;
	return $this;
}

1;