Class: DYI::Shape::Path::ShorthandQuadraticCurveCommand
- Inherits:
-
QuadraticCurveCommand
- Object
- CommandBase
- CurveCommandBase
- QuadraticCurveCommand
- DYI::Shape::Path::ShorthandQuadraticCurveCommand
- Defined in:
- lib/dyi/shape/path.rb
Overview
Instance Attribute Summary
Attributes inherited from CommandBase
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from QuadraticCurveCommand
#preceding_control_point, #to_compatible_commands
Methods inherited from CurveCommandBase
commands, #initialize, #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?
Constructor Details
This class inherits a constructor from DYI::Shape::Path::CurveCommandBase
Class Method Details
.pt_cnt ⇒ Object
937 938 939 |
# File 'lib/dyi/shape/path.rb', line 937 def pt_cnt 1 end |
Instance Method Details
#control_point ⇒ Object
920 921 922 923 924 925 926 |
# File 'lib/dyi/shape/path.rb', line 920 def control_point if relative? preceding_point - preceding_control_point else preceding_point * 2 - preceding_control_point end end |
#instructions_char ⇒ Object
932 933 934 |
# File 'lib/dyi/shape/path.rb', line 932 def instructions_char relative? ? 't' : 'T' end |
#last_control_point ⇒ Object
928 929 930 |
# File 'lib/dyi/shape/path.rb', line 928 def last_control_point preceding_point * 2 - preceding_control_point end |