GO::View::GD - a helper class for GO::View to deal with the image
use GO::View::GD;
To instantiate a new InitGD object, you may use following syntax:
my $gd = GO::Util::InitGD->new(width=>$imgWidth, height=>$imgHeight);
my $im = $gd->im; my $white = $gd->white; my $red = $gd->red;
and more ......
Title : new Function : Creates a new GO::View::GD object : recognized named parameters are height and width both of which must be provided. Returns : a GO::View::GD object Args : the named parameters
This method returns the internal GD::Image object
This method returns the height that was used to instantiate the object
This method returns the width that was used to instantiate the object
This method draws a blue frame around the image with date at the right bottom corner and image label on the left bottom corner if there is a label passed in. The date and label will be printed in red
Usage:
$gd->drawFrameWithLabelAndDate;
Optional arguments:
'date', which is a string indicating the date, otherwise the current date will be determineed and used. The date will be printed in red in the lower right hand corner.
'text', which is a string that can be used to label the image. This will printed in the lower left hand corner of the image.
This method draws a rectangle for a given coordinate set and creates a link for the box if there is a linkUrl passed in. The link for the box is in the form of text that can be placed in an image map on an html page. The text for that is currently printed to STDOUT.
$gd->drawBar(barColor=>$gd->blue, numX1=>$X1, numX2=>$X2, numY=>$Y, linkUrl=>$linkUrl, barHeight=>$barHeight, outline=>1, arrow=>'up');
Required Arguments:
barColor : The color of the box numX1 : The left-hand x-coordinate of the box numX2 : The right-hand x-coordinate of the box numY : The top y coorinate of the box
Optional Arguments:
strand : ??? - left over from use in SGDs ORF Map linkUrl : A url to which you would like the box to be linked barHeight : The height of the box - will be used to determine the bottom y-coordinate of the box - default is 4 pixels outlineColor : The color in which to outline the box onInfoText : Information text that can used for mouseovers
arrow : The type of arrowhead desired on the box. One of up, down, left, right, which indicates the direction in which the arrow head should point arrowHeight : The height of the arrowhead
This method draws a string and creates a link for it if there is a linkUrl passed in. The link is in the form of text that can be placed in an image map on an html page. The text for that is currently printed to STDOUT.
$gd->drawName(name=>" = GO term with child(ren)", nameColor=>$gd->black, numX1=>$numX1, numY=>$y-2);
name : The text that should be printed on the image nameColor : The color in which the text should be written numX1 : The X-coordinate where the text should be printed numY : The Y-coordinate where the text should be printed
Optional Arguments
linkUrl : A url to which you would like the text to be linked
Title : imageMap Usage : my $map = $goView->imageMap; Function : returns the text that constitutes an image map for the created image. During creation of various glyphs, that have had a URL passed in to which they could link, text that can be used as an image map for the image, within a web page, will be generated. When all glyphs have been added to the image, you can retrieve the image map text. It then needs to be wrapped in a <MAP>...</MAP> declaration, and the html that displays the image will need to refer to the image, eg: <MAP NAME='blah'> _IMAGE_MAP_TEXT_HERE_ </MAP> <img src='http::/some.url.here/xxx/gif' usemap='#blah'> Note that the map and the usemap tag have the same name. Returns : a string
This protected method appends the passed in string onto the image map that is generated for the image that is also created by this module
$self->_appendToMap($text);
Shuai Weng (shuai@genome.stanford.edu)
To install GO::TermFinder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GO::TermFinder
CPAN shell
perl -MCPAN -e shell install GO::TermFinder
For more information on module installation, please visit the detailed CPAN module installation guide.