Class: CTioga2::Graphics::Styles::ArrowStyle
- Inherits:
-
StrokeStyle
- Object
- BasicStyle
- LineStyle
- StrokeStyle
- CTioga2::Graphics::Styles::ArrowStyle
- Defined in:
- lib/ctioga2/graphics/styles/arrows.rb
Overview
This class represents an arrow
Constant Summary
Constants inherited from BasicStyle
BasicStyle::AllStyles, BasicStyle::OldAttrAccessor
Instance Method Summary collapse
Methods inherited from StrokeStyle
Methods inherited from LineStyle
Methods inherited from BasicStyle
alias_for, attr_accessor, attribute_type, attribute_types, attributes, deprecated_attribute, from_hash, inherited, #instance_variable_defined?, options_hash, #set_from_hash, sub_style, sub_styles, #to_hash, typed_attribute, #update_from_other
Instance Method Details
#draw_arrow(t, x1, y1, x2, y2) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/ctioga2/graphics/styles/arrows.rb', line 38 def draw_arrow(t, x1, y1, x2, y2) dict = self.to_hash dict.rename_key('width', 'line_width') dict.rename_key('style', 'line_style') dict['head'] = [x2,y2] dict['tail'] = [x1,y1] t.show_arrow(dict) end |