.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::Graphics::Glyph::fixedwidth 3pm" .TH Bio::Graphics::Glyph::fixedwidth 3pm "2018-09-21" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Graphics::Glyph::fixedwidth \- A base class fixed width glyphs .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Bio::Graphics; \& use Bio::Seq; \& use Bio::SeqFeature::Generic; \& \& my $bsg = \*(AqBio::SeqFeature::Generic\*(Aq; \& \& my $seq = Bio::Seq\->new(\-length=>1000); \& \& my $whole = $bsg\->new(\-display_name => \*(AqClone82\*(Aq, \& \-start => 1, \& \-end => $seq\->length); \& \& my $f1 = $bsg\->new(\-start => 100, \& \-end => 300, \& \-display_name => \*(Aqfeature 1\*(Aq, \& ); \& \& my $f2 = $bsg\->new(\-start => 500, \& \-end => 800, \& \-display_name => \*(Aqfeature 2\*(Aq, \& ); \& \& my $panel = Bio::Graphics::Panel\->new(\-length => $seq\->length, \& \-width => 800, \& \-key_style => \*(Aqbetween\*(Aq, \& \-pad_left => 10, \& \-pad_right => 10, \& ); \& \& $panel\->add_track($whole, \& \-glyph => \*(Aqarrow\*(Aq, \& \-double => 1, \& \-tick => 2, \& \-label => 1, \& ); \& \& $panel\->add_track([$f1,$f2], \& \-glyph => \*(Aqfixedwidth\*(Aq, \& \-label => 1, \& \-fixed_height => 20, \& \-fixed_width => 20, \& \-key => \*(Aqfixed width\*(Aq); \& \& binmode STDOUT; \& print $panel\->png; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This glyph is a base class for glyphs that wish to draw a fixed width content, such as an icon, image, scatterplot, and it would be inappropriate for the content to be stretched to match the start and end point of the associated feature. Instead the glyph draws a simple box spanning the feature's start:end region, two diagonal connecting lines, and then a fixed width rectangle beneath the box. .PP This glyph does nothing very interesting itself. It is intended that subclasses should override the \fIdraw_contents()\fR method to draw something interesting. See \*(L"Subclassing\*(R" for a simple example. .SS "\s-1OPTIONS\s0" .IX Subsection "OPTIONS" The following options are standard among all Glyphs. See Bio::Graphics::Glyph for a full explanation. .PP .Vb 2 \& Option Description Default \& \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \& \& \-fgcolor Foreground color black \& \& \-outlinecolor Synonym for \-fgcolor \& \& \-bgcolor Background color turquoise \& \& \-fillcolor Synonym for \-bgcolor \& \& \-linewidth Line width 1 \& \& \-height Height of glyph 10 \& \& \-font Glyph font gdSmallFont \& \& \-connector Connector type 0 (false) \& \& \-connector_color \& Connector color black \& \& \-label Whether to draw a label 0 (false) \& \& \-description Whether to draw a description 0 (false) \& \& \-hilite Highlight color undef (no color) .Ve .PP The following additional options are available to the \*(L"fixedwidth\*(R" glyph: .PP .Vb 2 \& Option Description Default \& \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \& \& \-fixed_width Width of the content 0 \& \& \& \-fixed_height Height of the content Same as \-height \& \& \-fixed_gap Vertical gap between the box 8 \& that shows the extent of the \& feature and the fixed\-width \& content. \& \& If \-fixed_gap is less than 8 \& then the diagonal connecting \& lines are not drawn. .Ve .SS "\s-1EXAMPLE SUBCLASS\s0" .IX Subsection "EXAMPLE SUBCLASS" To draw something interesting in the fixed rectangle, override the draw_contents method. It takes four arguments consisting of the \s-1GD\s0 object, and the left, top, right and bottom coordinates of the fixed rectangle. Example: .PP .Vb 3 \& package Bio::Graphics::Glyph::fixedexample; \& use strict; \& use base \*(AqBio::Graphics::Glyph::fixedwidth\*(Aq; \& \& sub draw_contents { \& my $self = shift; \& my ($gd,$left,$top,$right,$bottom) = @_; \& $self\->unfilled_box($gd,$left,$top,$right,$bottom); \& $gd\->line($left,$top,$right,$bottom,$self\->fgcolor); \& $gd\->line($left,$bottom,$right,$top,$self\->fgcolor); \& } \& \& 1; .Ve .PP This will draw the outline of the fixed rectangle. The rectangle will contain two diagonal lines. Not very interesting, but an example, nonetheless. .PP See the stackedplot glyph for a more interesting subclass. .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" This glyph should used as the base for the image glyph, but isn't. This will be fixed. .SH "SEE ALSO" .IX Header "SEE ALSO" Bio::Graphics::Panel, Bio::Graphics::Glyph, Bio::Graphics::Glyph::arrow, Bio::Graphics::Glyph::cds, Bio::Graphics::Glyph::crossbox, Bio::Graphics::Glyph::diamond, Bio::Graphics::Glyph::dna, Bio::Graphics::Glyph::dot, Bio::Graphics::Glyph::ellipse, Bio::Graphics::Glyph::extending_arrow, Bio::Graphics::Glyph::generic, Bio::Graphics::Glyph::graded_segments, Bio::Graphics::Glyph::heterogeneous_segments, Bio::Graphics::Glyph::line, Bio::Graphics::Glyph::pinsertion, Bio::Graphics::Glyph::primers, Bio::Graphics::Glyph::rndrect, Bio::Graphics::Glyph::segments, Bio::Graphics::Glyph::ruler_arrow, Bio::Graphics::Glyph::toomany, Bio::Graphics::Glyph::transcript, Bio::Graphics::Glyph::transcript2, Bio::Graphics::Glyph::translation, Bio::Graphics::Glyph::triangle, Bio::DB::GFF, Bio::SeqI, Bio::SeqFeatureI, Bio::Das, \&\s-1GD\s0 .SH "AUTHOR" .IX Header "AUTHOR" Lincoln Stein .PP Copyright (c) 2007 Cold Spring Harbor Laboratory .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \s-1DISCLAIMER\s0.txt for disclaimers of warranty.