Class: Wx::SF::ProngArrow
- Defined in:
- lib/wx/shapes/arrows/prong_arrow.rb
Overview
Class extends the Wx::OpenArrow class and encapsulates arrow shape consisting of single two lines bisecting before the end of the parent line shape.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#draw(from, to, dc) ⇒ Wx::Point
Draw arrow shape at the end of a virtual line.
Methods inherited from OpenArrow
Methods inherited from LineArrow
#get_pen, #get_pen_width, #initialize, #scale, #set_parent_shape, #set_pen
Methods inherited from ArrowBase
#get_parent_shape, #initialize, #set_parent_shape, #translate_arrow
Constructor Details
This class inherits a constructor from Wx::SF::OpenArrow
Class Method Details
Instance Method Details
#draw(from, to, dc) ⇒ Wx::Point
Draw arrow shape at the end of a virtual line.
30 31 32 33 34 35 36 37 38 |
# File 'lib/wx/shapes/arrows/prong_arrow.rb', line 30 def draw(from, to, dc) cp, wing1, wing2, tip = translate_arrow(vertices, from, to) dc.with_pen(pen) do |dc| dc.draw_line(cp, wing1) dc.draw_line(cp, wing2) dc.draw_line(cp, tip) end cp end |