Class: Bio::Graphics::Glyph::Box

Inherits:
Common
  • Object
show all
Defined in:
lib/bio/graphics/glyphs/box.rb

Instance Attribute Summary

Attributes inherited from Common

#feature_context, #subfeature

Instance Method Summary collapse

Methods inherited from Common

#initialize, #left_pixel, #right_pixel

Constructor Details

This class inherits a constructor from Bio::Graphics::Glyph::Common

Instance Method Details

#drawObject


11
12
13
14
15
16
17
18
19
# File 'lib/bio/graphics/glyphs/box.rb', line 11

def draw
  @feature_context.move_to(self.left_pixel, 0)
  @feature_context.line_to(self.right_pixel, 0)
  @feature_context.line_to(self.right_pixel, Bio::Graphics::FEATURE_HEIGHT)
  @feature_context.line_to(self.left_pixel, Bio::Graphics::FEATURE_HEIGHT)
  @feature_context.close_path
  @feature_context.stroke

end