Class: Postsvg::Model::Operators::Font::Charpath
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::Font::Charpath
- Defined in:
- lib/postsvg/model/operators/font.rb
Overview
Appends glyph outlines for text to the current path
(PLRM charpath).
Instance Attribute Summary collapse
-
#stroke ⇒ Object
readonly
Returns the value of attribute stroke.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(text:, stroke:) ⇒ Charpath
constructor
A new instance of Charpath.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(text:, stroke:) ⇒ Charpath
Returns a new instance of Charpath.
107 108 109 110 111 |
# File 'lib/postsvg/model/operators/font.rb', line 107 def initialize(text:, stroke:) @text = text @stroke = stroke freeze end |
Instance Attribute Details
#stroke ⇒ Object (readonly)
Returns the value of attribute stroke.
106 107 108 |
# File 'lib/postsvg/model/operators/font.rb', line 106 def stroke @stroke end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
106 107 108 |
# File 'lib/postsvg/model/operators/font.rb', line 106 def text @text end |
Class Method Details
.from_operands(stack) ⇒ Object
112 113 114 115 116 |
# File 'lib/postsvg/model/operators/font.rb', line 112 def self.from_operands(stack) stroke = stack.pop text = stack.pop new(text: text, stroke: stroke) end |