<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Ace::Graphics::GlyphFactory - Create Ace::Graphics::Glyphs</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@localhost" /> </head> <body style="background-color: white"> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <!-- <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#methods">METHODS</a></li> <ul> <li><a href="#constructors">CONSTRUCTORS</a></li> <li><a href="#object_methods">OBJECT METHODS</a></li> </ul> <li><a href="#bugs">BUGS</a></li> <li><a href="#see_also">SEE ALSO</a></li> <li><a href="#author">AUTHOR</a></li> </ul> --> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>Ace::Graphics::GlyphFactory - Create Ace::Graphics::Glyphs</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> use Ace::Graphics::GlyphFactory;</pre> <pre> my $factory = Ace::Graphics::GlyphFactory($glyph_name,@options);</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>The Ace::Graphics::GlyphFactory class is used internally by Ace::Graphics::Track and Ace::Graphics::Glyph to hold the options pertaining to a set of related glyphs and creating them on demand. This class is not ordinarily useful to the end-developer.</p> <p> </p> <hr /> <h1><a name="methods">METHODS</a></h1> <p>This section describes the class and object methods for Ace::Graphics::GlyphFactory.</p> <p> </p> <h2><a name="constructors">CONSTRUCTORS</a></h2> <p>There is only one constructor, the <a href="#new"><code>new()</code></a> method. It is ordinarily called by Ace::Graphics::Track, in the <code>make_factory()</code> subroutine.</p> <dl> <dt><strong><a name="new" class="item">$factory = Ace::Graphics::GlyphFactory-><code>new($glyph_name,@options)</code></a></strong> <dd> <p>The <a href="#new"><code>new()</code></a> method creates a new factory object. The object will create glyphs of type $glyph_name, and using the options specified in @options. Generic options are described in <a href="/AcePerl/docs/./Ace/Graphics/Panel.html">the Ace::Graphics::Panel manpage</a>, and specific options are described in each of the Ace::Graphics::Glyph::* manual pages. =back</p> </dd> </li> </dl> <p> </p> <h2><a name="object_methods">OBJECT METHODS</a></h2> <p>Once a track is created, the following methods can be invoked:</p> <dl> <dt><strong><a name="glyph" class="item">$glyph = $factory-><code>glyph($feature)</code></a></strong> <dd> <p>Given a sequence feature, creates an Ace::Graphics::Glyph object to display it. The various attributes of the glyph are set from the options provided at factory creation time.</p> </dd> </li> <dt><strong><a name="option" class="item">$option = $factory->option($option_name [,$new_option])</a></strong> <dd> <p>Given an option name, returns its value. If a second argument is provided, sets the option to the new value and returns its previous one.</p> </dd> </li> <dt><strong><a name="fgcolor" class="item">$index = $factory->fgcolor</a></strong> <dd> <p>Returns the desired foreground color for the glyphs in the form of an GD::Image color index. This may be the one of the special colors gdBrushed and gdStyled. This is only useful while the enclosing Ace::Graphics::Panel object is rendering the object. In other contexts it returns undef.</p> </dd> </li> <dt><strong><a name="scale" class="item">$scale = $factory-><code>scale([$scale])</code></a></strong> <dd> <p>Get or set the scale, in pixels/bp, for the glyph. This is ordinarily set by the Ace::Graphics::Track object just prior to rendering, and called by each glyphs' <code>map_pt()</code> method when performing the rendering.</p> </dd> </li> <dt><strong><a name="bgcolor" class="item">$color = $factory-><code>bgcolor([$color])</code></a></strong> <dd> <p>Get or set the background color for the glyphs.</p> </dd> </li> <dt><strong><a name="fillcolor" class="item">$color = $factory-><code>fillcolor([$color])</code></a></strong> <dd> <p>Get or set the fill color for the glyphs.</p> </dd> </li> <dt><strong><a name="font" class="item">$font = $factory-><code>font([$font])</code></a></strong> <dd> <p>Get or set the font to use for rendering the glyph.</p> </dd> </li> <dt><strong><a name="fontcolor" class="item">$color = $factory->fontcolor</a></strong> <dd> <p>Get the color for the font (to set it, use fgcolor()). This is subtly different from <a href="#fgcolor"><code>fgcolor()</code></a> itself, because it will never return a styled color, such as gdBrushed.</p> </dd> </li> <dt><strong><a name="panel" class="item">$panel = $factory-><code>panel([$panel])</code></a></strong> <dd> <p>Get or set the panel that contains the GD::Image object used by this factory.</p> </dd> </li> <dt><strong><a name="translate" class="item">$index = $factory-><code>translate($color)</code></a></strong> <dt><strong><a name="rgb" class="item">@rgb = $factory-><code>rgb($index)</code></a></strong> <dd> <p>These are convenience procedures that are passed through to the enclosing Panel object and have the same effect as the like-named methods in that class. See <a href="/AcePerl/docs/./Ace/Graphics/Panel.html">the Ace::Graphics::Panel manpage</a>.</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name="bugs">BUGS</a></h1> <p>Please report them.</p> <p> </p> <hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p><a href="/AcePerl/docs/./Ace/Sequence.html">the Ace::Sequence manpage</a>, <a href="/AcePerl/docs/./Ace/Sequence/Feature.html">the Ace::Sequence::Feature manpage</a>, <a href="/AcePerl/docs/./Ace/Graphics/Panel.html">the Ace::Graphics::Panel manpage</a>, <a href="/AcePerl/docs/./Ace/Graphics/Track.html">the Ace::Graphics::Track manpage</a>, <a href="/AcePerl/docs/./Ace/Graphics/Glyph.html">the Ace::Graphics::Glyph manpage</a></p> <p> </p> <hr /> <h1><a name="author">AUTHOR</a></h1> <p>Lincoln Stein <<a href="mailto:lstein@cshl.org">lstein@cshl.org</a>>.</p> <p>Copyright (c) 2001 Cold Spring Harbor Laboratory</p> <p>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.</p> </body> </html>