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: PDF1.7 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.
273 274 275 |
# File 'lib/hexapdf/content/operator.rb', line 273 def initialize super('d') end |
Instance Method Details
#invoke(processor, dash_array, dash_phase) ⇒ Object
:nodoc:
277 278 279 |
# File 'lib/hexapdf/content/operator.rb', line 277 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:
281 282 283 284 |
# File 'lib/hexapdf/content/operator.rb', line 281 def serialize(serializer, dash_array, dash_phase) #:nodoc: "#{serializer.serialize_array(dash_array)} " \ "#{serializer.serialize_integer(dash_phase)} d\n" end |