Class: Postsvg::Model::Operators::GraphicsState::Setdash
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::GraphicsState::Setdash
- Defined in:
- lib/postsvg/model/operators/graphics_state.rb
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pattern:, offset:) ⇒ Setdash
constructor
A new instance of Setdash.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(pattern:, offset:) ⇒ Setdash
Returns a new instance of Setdash.
70 71 72 73 74 |
# File 'lib/postsvg/model/operators/graphics_state.rb', line 70 def initialize(pattern:, offset:) @pattern = pattern @offset = offset freeze end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
69 70 71 |
# File 'lib/postsvg/model/operators/graphics_state.rb', line 69 def offset @offset end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
69 70 71 |
# File 'lib/postsvg/model/operators/graphics_state.rb', line 69 def pattern @pattern end |
Class Method Details
.from_operands(stack) ⇒ Object
75 76 77 78 79 |
# File 'lib/postsvg/model/operators/graphics_state.rb', line 75 def self.from_operands(stack) offset = stack.pop_number pattern = stack.pop new(pattern: pattern, offset: offset) end |