]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed feature width issue
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 10 Feb 2010 15:54:39 +0000 (15:54 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 10 Feb 2010 15:54:39 +0000 (15:54 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@873 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/BGB/Draw.pm
code_perl/Maasha/BGB/Track.pm

index f3dd63dd00902192558dfd68b61ae16e9af9c51e..dcb7ef0ba851b9b05438ac214bb440d369903652 100644 (file)
@@ -86,8 +86,8 @@ sub draw_feature
             $cr->rectangle(
                 $feature->{ 'x1' },
                 $feature->{ 'y1' },
-                $feature->{ 'x2' } - $feature->{ 'x1' },
-                $feature->{ 'y2' } - $feature->{ 'y1' },
+                $feature->{ 'x2' } - $feature->{ 'x1' } + 1,
+                $feature->{ 'y2' } - $feature->{ 'y1' } + 1,
             );
 
             $cr->fill;
index 0b3531d2ca9ce2cf7d57fda51924b74e59340153..a3cad5d9990e3e68099e385ad215002ed0d6e733 100644 (file)
@@ -246,7 +246,7 @@ sub track_feature_linear
                 last if $x1 >= $ladder[ $y_step ] + 1; 
             }
 
-            $y1 = $cookie->{ 'TRACK_OFFSET' } + ( ( 0.1 + $cookie->{ 'FEAT_WIDTH' } ) * $y_step );
+            $y1 = $cookie->{ 'TRACK_OFFSET' } + ( ( 1.1 + $cookie->{ 'FEAT_WIDTH' } ) * $y_step );
 
             $feature = {
                 line_width => $cookie->{ 'FEAT_WIDTH' },
@@ -270,7 +270,7 @@ sub track_feature_linear
 
             push @features, $feature;
 
-            $y_max = Maasha::Calc::max( $y_max, $y_step * ( 0.1 + $cookie->{ 'FEAT_WIDTH' } ) );
+            $y_max = Maasha::Calc::max( $y_max, $y_step * ( 1.1 + $cookie->{ 'FEAT_WIDTH' } ) );
 
             push @features, feature_align( $entry, $beg, $y1, $factor, $cookie->{ 'FEAT_WIDTH' } ) if $entry->[ ALIGN ] ne '.';