class DYI::Shape::Path::QuadraticCurveCommand
Public Class Methods
pt_cnt()
click to toggle source
# File lib/dyi/shape/path.rb, line 912 def pt_cnt 2 end
Public Instance Methods
control_point()
click to toggle source
# File lib/dyi/shape/path.rb, line 897 def control_point @control_points[0] end
instructions_char()
click to toggle source
# File lib/dyi/shape/path.rb, line 907 def instructions_char relative? ? 'q' : 'Q' end
preceding_control_point()
click to toggle source
# File lib/dyi/shape/path.rb, line 889 def preceding_control_point if preceding_command.is_a?(QuadraticCurveCommand) preceding_command.last_control_point else preceding_command.last_point end end
to_compatible_commands(preceding_command)
click to toggle source
# File lib/dyi/shape/path.rb, line 901 def to_compatible_commands(preceding_command) ctrl_pt1 = relative? ? control_point * 2.0 / 3.0 : (preceding_point + control_point * 2.0) / 3.0 ctrl_pt2 = (control_point * 2.0 + point) / 3.0 CurveCommand.new(relative?, preceding_command, ctrl_pt1, ctrl_pt2, @point) end