Class: Postsvg::Model::Operators::Path::Arcn
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::Path::Arcn
- Defined in:
- lib/postsvg/model/operators/path.rb
Instance Attribute Summary collapse
-
#angle1 ⇒ Object
readonly
Returns the value of attribute angle1.
-
#angle2 ⇒ Object
readonly
Returns the value of attribute angle2.
-
#radius ⇒ Object
readonly
Returns the value of attribute radius.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(x:, y:, radius:, angle1:, angle2:) ⇒ Arcn
constructor
A new instance of Arcn.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(x:, y:, radius:, angle1:, angle2:) ⇒ Arcn
Returns a new instance of Arcn.
141 142 143 144 145 146 147 148 |
# File 'lib/postsvg/model/operators/path.rb', line 141 def initialize(x:, y:, radius:, angle1:, angle2:) @x = x @y = y @radius = radius @angle1 = angle1 @angle2 = angle2 freeze end |
Instance Attribute Details
#angle1 ⇒ Object (readonly)
Returns the value of attribute angle1.
140 141 142 |
# File 'lib/postsvg/model/operators/path.rb', line 140 def angle1 @angle1 end |
#angle2 ⇒ Object (readonly)
Returns the value of attribute angle2.
140 141 142 |
# File 'lib/postsvg/model/operators/path.rb', line 140 def angle2 @angle2 end |
#radius ⇒ Object (readonly)
Returns the value of attribute radius.
140 141 142 |
# File 'lib/postsvg/model/operators/path.rb', line 140 def radius @radius end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
140 141 142 |
# File 'lib/postsvg/model/operators/path.rb', line 140 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
140 141 142 |
# File 'lib/postsvg/model/operators/path.rb', line 140 def y @y end |
Class Method Details
.from_operands(stack) ⇒ Object
149 150 151 152 153 154 155 156 |
# File 'lib/postsvg/model/operators/path.rb', line 149 def self.from_operands(stack) angle2 = stack.pop_number angle1 = stack.pop_number radius = stack.pop_number y = stack.pop_number x = stack.pop_number new(x: x, y: y, radius: radius, angle1: angle1, angle2: angle2) end |