Class: Postscript::Model::Operators::GraphicsState::Setlinewidth
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::GraphicsState::Setlinewidth
- Defined in:
- lib/postscript/model/operators/graphics_state.rb
Instance Attribute Summary collapse
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(width:) ⇒ Setlinewidth
constructor
A new instance of Setlinewidth.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(width:) ⇒ Setlinewidth
Returns a new instance of Setlinewidth.
22 23 24 25 |
# File 'lib/postscript/model/operators/graphics_state.rb', line 22 def initialize(width:) @width = width freeze end |
Instance Attribute Details
#width ⇒ Object (readonly)
Returns the value of attribute width.
21 22 23 |
# File 'lib/postscript/model/operators/graphics_state.rb', line 21 def width @width end |
Class Method Details
.from_operands(stack) ⇒ Object
26 27 28 |
# File 'lib/postscript/model/operators/graphics_state.rb', line 26 def self.from_operands(stack) new(width: stack.pop_number) end |