Class: Postscript::Model::Operators::Path::Rcurveto
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Path::Rcurveto
- Defined in:
- lib/postscript/model/operators/path.rb
Instance Attribute Summary collapse
-
#dx1 ⇒ Object
readonly
Returns the value of attribute dx1.
-
#dx2 ⇒ Object
readonly
Returns the value of attribute dx2.
-
#dx3 ⇒ Object
readonly
Returns the value of attribute dx3.
-
#dy1 ⇒ Object
readonly
Returns the value of attribute dy1.
-
#dy2 ⇒ Object
readonly
Returns the value of attribute dy2.
-
#dy3 ⇒ Object
readonly
Returns the value of attribute dy3.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dx1:, dy1:, dx2:, dy2:, dx3:, dy3:) ⇒ Rcurveto
constructor
A new instance of Rcurveto.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(dx1:, dy1:, dx2:, dy2:, dx3:, dy3:) ⇒ Rcurveto
Returns a new instance of Rcurveto.
97 98 99 100 101 102 103 104 105 |
# File 'lib/postscript/model/operators/path.rb', line 97 def initialize(dx1:, dy1:, dx2:, dy2:, dx3:, dy3:) @dx1 = dx1 @dy1 = dy1 @dx2 = dx2 @dy2 = dy2 @dx3 = dx3 @dy3 = dy3 freeze end |
Instance Attribute Details
#dx1 ⇒ Object (readonly)
Returns the value of attribute dx1.
96 97 98 |
# File 'lib/postscript/model/operators/path.rb', line 96 def dx1 @dx1 end |
#dx2 ⇒ Object (readonly)
Returns the value of attribute dx2.
96 97 98 |
# File 'lib/postscript/model/operators/path.rb', line 96 def dx2 @dx2 end |
#dx3 ⇒ Object (readonly)
Returns the value of attribute dx3.
96 97 98 |
# File 'lib/postscript/model/operators/path.rb', line 96 def dx3 @dx3 end |
#dy1 ⇒ Object (readonly)
Returns the value of attribute dy1.
96 97 98 |
# File 'lib/postscript/model/operators/path.rb', line 96 def dy1 @dy1 end |
#dy2 ⇒ Object (readonly)
Returns the value of attribute dy2.
96 97 98 |
# File 'lib/postscript/model/operators/path.rb', line 96 def dy2 @dy2 end |
#dy3 ⇒ Object (readonly)
Returns the value of attribute dy3.
96 97 98 |
# File 'lib/postscript/model/operators/path.rb', line 96 def dy3 @dy3 end |
Class Method Details
.from_operands(stack) ⇒ Object
106 107 108 109 110 111 112 113 114 |
# File 'lib/postscript/model/operators/path.rb', line 106 def self.from_operands(stack) dy3 = stack.pop_number dx3 = stack.pop_number dy2 = stack.pop_number dx2 = stack.pop_number dy1 = stack.pop_number dx1 = stack.pop_number new(dx1: dx1, dy1: dy1, dx2: dx2, dy2: dy2, dx3: dx3, dy3: dy3) end |