1Ace::Graphics::GlyphFacUtsoerry(C3o)ntributed Perl DocumAecnet:a:tGiroanphics::GlyphFactory(3)
2
3
4

NAME

6       Ace::Graphics::GlyphFactory - Create Ace::Graphics::Glyphs
7

SYNOPSIS

9         use Ace::Graphics::GlyphFactory;
10
11         my $factory = Ace::Graphics::GlyphFactory($glyph_name,@options);
12

DESCRIPTION

14       The Ace::Graphics::GlyphFactory class is used internally by Ace::Graph‐
15       ics::Track and Ace::Graphics::Glyph to hold the options pertaining to a
16       set of related glyphs and creating them on demand.  This class is not
17       ordinarily useful to the end-developer.
18

METHODS

20       This section describes the class and object methods for Ace::Graph‐
21       ics::GlyphFactory.
22
23       CONSTRUCTORS
24
25       There is only one constructor, the new() method.  It is ordinarily
26       called by Ace::Graphics::Track, in the make_factory() subroutine.
27
28       $factory = Ace::Graphics::GlyphFactory->new($glyph_name,@options)
29           The new() method creates a new factory object.  The object will
30           create glyphs of type $glyph_name, and using the options specified
31           in @options.  Generic options are described in Ace::Graph‐
32           ics::Panel, and specific options are described in each of the
33           Ace::Graphics::Glyph::* manual pages.  =back
34
35       OBJECT METHODS
36
37       Once a track is created, the following methods can be invoked:
38
39           $glyph = $factory->glyph($feature)
40               Given a sequence feature, creates an Ace::Graphics::Glyph
41               object to display it.  The various attributes of the glyph are
42               set from the options provided at factory creation time.
43
44           $option = $factory->option($option_name [,$new_option])
45               Given an option name, returns its value.  If a second argument
46               is provided, sets the option to the new value and returns its
47               previous one.
48
49           $index = $factory->fgcolor
50               Returns the desired foreground color for the glyphs in the form
51               of an GD::Image color index.  This may be the one of the spe‐
52               cial colors gdBrushed and gdStyled.  This is only useful while
53               the enclosing Ace::Graphics::Panel object is rendering the
54               object.  In other contexts it returns undef.
55
56           $scale = $factory->scale([$scale])
57               Get or set the scale, in pixels/bp, for the glyph.  This is
58               ordinarily set by the Ace::Graphics::Track object just prior to
59               rendering, and called by each glyphs' map_pt() method when per‐
60               forming the rendering.
61
62           $color = $factory->bgcolor([$color])
63               Get or set the background color for the glyphs.
64
65           $color = $factory->fillcolor([$color])
66               Get or set the fill color for the glyphs.
67
68           $font = $factory->font([$font])
69               Get or set the font to use for rendering the glyph.
70
71           $color = $factory->fontcolor
72               Get the color for the font (to set it, use fgcolor()).  This is
73               subtly different from fgcolor() itself, because it will never
74               return a styled color, such as gdBrushed.
75
76           $panel = $factory->panel([$panel])
77               Get or set the panel that contains the GD::Image object used by
78               this factory.
79
80           $index = $factory->translate($color)
81           @rgb = $factory->rgb($index)
82               These are convenience procedures that are passed through to the
83               enclosing Panel object and have the same effect as the like-
84               named methods in that class.  See Ace::Graphics::Panel.
85

BUGS

87       Please report them.
88

SEE ALSO

90       Ace::Sequence, Ace::Sequence::Feature, Ace::Graphics::Panel,
91       Ace::Graphics::Track, Ace::Graphics::Glyph
92

AUTHOR

94       Lincoln Stein <lstein@cshl.org>.
95
96       Copyright (c) 2001 Cold Spring Harbor Laboratory
97
98       This library is free software; you can redistribute it and/or modify it
99       under the same terms as Perl itself.  See DISCLAIMER.txt for dis‐
100       claimers of warranty.
101
102
103
104perl v5.8.8                       2001-02-20    Ace::Graphics::GlyphFactory(3)
Impressum