Class: HexaPDF::Content::Operator::CurveTo

Inherits:
BaseOperator show all
Defined in:
lib/hexapdf/content/operator.rb

Overview

Implementation of the ā€˜cā€™ operators.

See: PDF2.0 s8.5.2.1

Instance Attribute Summary

Attributes inherited from BaseOperator

#name

Instance Method Summary collapse

Methods inherited from BaseOperator

#invoke

Constructor Details

#initializeCurveTo

Creates the operator.



602
603
604
# File 'lib/hexapdf/content/operator.rb', line 602

def initialize
  super('c')
end

Instance Method Details

#serialize(serializer, x1, y1, x2, y2, x3, y3) ⇒ Object

:nodoc:



606
607
608
609
610
# File 'lib/hexapdf/content/operator.rb', line 606

def serialize(serializer, x1, y1, x2, y2, x3, y3) #:nodoc:
  "#{serializer.serialize_numeric(x1)} #{serializer.serialize_numeric(y1)} " \
    "#{serializer.serialize_numeric(x2)} #{serializer.serialize_numeric(y2)} " \
    "#{serializer.serialize_numeric(x3)} #{serializer.serialize_numeric(y3)} c\n"
end