Class: Bio::Graphics::Glyph::Dot
- Defined in:
- lib/bio/graphics/glyphs/dot.rb
Instance Attribute Summary collapse
-
#radius ⇒ Object
Returns the value of attribute radius.
Attributes inherited from Common
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 Attribute Details
#radius ⇒ Object
Returns the value of attribute radius.
11 12 13 |
# File 'lib/bio/graphics/glyphs/dot.rb', line 11 def radius @radius end |
Instance Method Details
#draw ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/bio/graphics/glyphs/dot.rb', line 13 def draw raise "Start and stop are not the same (necessary if you want triangle glyphs)" if @subfeature.start != @subfeature.stop @radius = Bio::Graphics::FEATURE_HEIGHT/2 @feature_context.circle(self.left_pixel + @radius, @radius, @radius).fill @feature_context.close_path.stroke end |