Class: DYI::Shape::Path::CurveCommand
Overview
Instance Attribute Summary
Attributes inherited from CommandBase
#point, #preceding_command
Class Method Summary
collapse
Instance Method Summary
collapse
commands, #initialize, #last_control_point, #to_concise_syntax_fragments
Methods inherited from CommandBase
#absolute?, absolute_commands, #initialize, #last_point, #preceding_point, #relative?, relative_commands, #start_point, #to_compatible_commands, #used_same_command?
Class Method Details
.pt_cnt ⇒ Object
855
856
857
|
# File 'lib/dyi/shape/path.rb', line 855
def pt_cnt
3
end
|
Instance Method Details
#control_point1 ⇒ Object
842
843
844
|
# File 'lib/dyi/shape/path.rb', line 842
def control_point1
@control_points[0]
end
|
#control_point2 ⇒ Object
846
847
848
|
# File 'lib/dyi/shape/path.rb', line 846
def control_point2
@control_points[1]
end
|
#instructions_char ⇒ Object
850
851
852
|
# File 'lib/dyi/shape/path.rb', line 850
def instructions_char
relative? ? 'c' : 'C'
end
|
#preceding_control_point ⇒ Object
834
835
836
837
838
839
840
|
# File 'lib/dyi/shape/path.rb', line 834
def preceding_control_point
if preceding_command.is_a?(CurveCommand)
preceding_command.last_control_point
else
preceding_command.last_point
end
end
|