Class: Bio::Graphics::Glyph::LineWithHandles
- Defined in:
- lib/bio/graphics/glyphs/line_with_handles.rb
Instance Attribute Summary
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 Method Details
#draw ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bio/graphics/glyphs/line_with_handles.rb', line 11 def draw @feature_context.move_to(self.left_pixel,Bio::Graphics::FEATURE_ARROW_LENGTH) @feature_context.line_to(self.right_pixel,Bio::Graphics::FEATURE_ARROW_LENGTH) @feature_context.stroke @feature_context.set_source_rgb([0,0,0]) arrow(@feature_context,:right,self.left_pixel,0,Bio::Graphics::FEATURE_ARROW_LENGTH) @feature_context.close_path.stroke arrow(@feature_context,:left,self.right_pixel,0,Bio::Graphics::FEATURE_ARROW_LENGTH) @feature_context.close_path.stroke @feature_context.set_source_rgb(@subfeature.colour) end |