Class: EideticPDF::MiscWriter

Inherits:
BaseWriter show all
Defined in:
lib/epdfsw.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from BaseWriter

#f, #g

Constructor Details

#initialize(stream) ⇒ MiscWriter

Returns a new instance of MiscWriter.



24
25
26
# File 'lib/epdfsw.rb', line 24

def initialize(stream)
  @stream = stream
end

Instance Method Details

#set_cmyk_color_fill(c, m, y, k) ⇒ Object



36
37
38
# File 'lib/epdfsw.rb', line 36

def set_cmyk_color_fill(c, m, y, k)
  @stream << "%s %s %s %s k\n" % [g(c), g(m), g(y), g(k)]
end

#set_cmyk_color_stroke(c, m, y, k) ⇒ Object



40
41
42
# File 'lib/epdfsw.rb', line 40

def set_cmyk_color_stroke(c, m, y, k)
  @stream << "%s %s %s %s K\n" % [g(c), g(m), g(y), g(k)]
end

#set_color_fill(colors) ⇒ Object



60
61
62
# File 'lib/epdfsw.rb', line 60

def set_color_fill(colors)
  @stream << "%s sc\n" % colors.map { |c| g(c) }.join(' ')
end

#set_color_rendering_intent(intent) ⇒ Object

xxx scn, SCN: patterns and separations



69
70
71
# File 'lib/epdfsw.rb', line 69

def set_color_rendering_intent(intent)
  @stream << "/#{intent} ri\n"
end

#set_color_space_fill(name) ⇒ Object



52
53
54
# File 'lib/epdfsw.rb', line 52

def set_color_space_fill(name)
  @stream << "/#{name} cs\n"
end

#set_color_space_stroke(name) ⇒ Object



56
57
58
# File 'lib/epdfsw.rb', line 56

def set_color_space_stroke(name)
  @stream << "/#{name} CS\n"
end

#set_color_stroke(colors) ⇒ Object



64
65
66
# File 'lib/epdfsw.rb', line 64

def set_color_stroke(colors)
  @stream << "%s SC\n" % colors.map { |c| g(c) }.join(' ')
end

#set_gray_fill(gray) ⇒ Object



28
29
30
# File 'lib/epdfsw.rb', line 28

def set_gray_fill(gray)
  @stream << "%s g\n" % g(gray)
end

#set_gray_stroke(gray) ⇒ Object



32
33
34
# File 'lib/epdfsw.rb', line 32

def set_gray_stroke(gray)
  @stream << "%s G\n" % g(gray)
end

#set_rgb_color_fill(red, green, blue) ⇒ Object



44
45
46
# File 'lib/epdfsw.rb', line 44

def set_rgb_color_fill(red, green, blue)
  @stream << "%s %s %s rg\n" % [g(red), g(green), g(blue)]
end

#set_rgb_color_stroke(red, green, blue) ⇒ Object



48
49
50
# File 'lib/epdfsw.rb', line 48

def set_rgb_color_stroke(red, green, blue)
  @stream << "%s %s %s RG\n" % [g(red), g(green), g(blue)]
end

#x_object(name) ⇒ Object



73
74
75
# File 'lib/epdfsw.rb', line 73

def x_object(name)
  @stream << "/#{name} Do\n"
end