Class: HexaPDF::Content::Operator::SetLineDashPattern
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::SetLineDashPattern
- Defined in:
- lib/hexapdf/content/operator.rb
Overview
Implementation of the ādā operator.
See: PDF2.0 s8.4.4
Instance Attribute Summary
Attributes inherited from BaseOperator
Instance Method Summary collapse
-
#initialize ⇒ SetLineDashPattern
constructor
Creates the operator.
-
#invoke(processor, dash_array, dash_phase) ⇒ Object
:nodoc:.
-
#serialize(serializer, dash_array, dash_phase) ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ SetLineDashPattern
Creates the operator.
271 272 273 |
# File 'lib/hexapdf/content/operator.rb', line 271 def initialize super('d') end |
Instance Method Details
#invoke(processor, dash_array, dash_phase) ⇒ Object
:nodoc:
275 276 277 |
# File 'lib/hexapdf/content/operator.rb', line 275 def invoke(processor, dash_array, dash_phase) #:nodoc: processor.graphics_state.line_dash_pattern = LineDashPattern.new(dash_array, dash_phase) end |
#serialize(serializer, dash_array, dash_phase) ⇒ Object
:nodoc:
279 280 281 282 |
# File 'lib/hexapdf/content/operator.rb', line 279 def serialize(serializer, dash_array, dash_phase) #:nodoc: "#{serializer.serialize_array(dash_array)} " \ "#{serializer.serialize_integer(dash_phase)} d\n" end |