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

« back to all changes in this revision

Viewing changes to Graphics/TriD/TriD/Labels.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
=head1 NAME
 
2
 
 
3
PDL::Graphics::TriD::Labels -- Text tools
 
4
 
 
5
=head1 SYNOPSIS
 
6
 
 
7
  my $l = new PDL::Graphics::TriD::Labels($lablepoints,
 
8
                                          {Strings=>$strlist
 
9
                                           ,Font=>$font});
 
10
 
 
11
 
 
12
=head1 WARNING
 
13
 
 
14
This module is experimental and the interface will probably change.
 
15
 
 
16
=head1 DESCRIPTION
 
17
 
 
18
This module is used to write Labels on the graphs of TriD
 
19
 
 
20
=head1 AUTHOR
 
21
 
 
22
Copyright (C) 1997 Tuomas J. Lukka (lukka@husc.harvard.edu).
 
23
              2000 James P.  Edwards (jedwards@inmet.gov.br)
 
24
All rights reserved. There is no warranty. You are allowed
 
25
to redistribute this software / documentation under certain
 
26
conditions. For details, see the file COPYING in the PDL
 
27
distribution. If this file is separated from the PDL distribution,
 
28
the copyright notice should be included in the file.
 
29
 
 
30
 
 
31
=cut
 
32
package PDL::Graphics::TriD::Labels;
 
33
use PDL::Graphics::OpenGL;
 
34
use PDL::Graphics::OpenGLQ;
 
35
use base qw/PDL::Graphics::TriD::GObject/;
 
36
 
 
37
sub gdraw {
 
38
        my($this,$points) = @_;
 
39
        glDisable(&GL_LIGHTING);
 
40
        glColor3d(1,1,1);
 
41
        PDL::Graphics::OpenGLQ::gl_texts($points,$this->{Options}{Font},$this->{Options}{Strings});
 
42
        glEnable(&GL_LIGHTING);
 
43
}
 
44
 
 
45
sub get_valid_options {
 
46
  return {UseDefcols => 0, Font=>$PDL::Graphics::TriD::GL::fontbase, Strings => [] }
 
47
}
 
48
 
 
49
 
 
50
1;