Class: PDF::Inspector::ExtGState

Inherits:
PDF::Inspector show all
Defined in:
lib/pdf/inspector/extgstate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from PDF::Inspector

analyze, analyze_file, parse

Constructor Details

#initializeExtGState

Returns a new instance of ExtGState.



6
7
8
# File 'lib/pdf/inspector/extgstate.rb', line 6

def initialize
  @extgstates = []
end

Instance Attribute Details

#extgstatesObject

Returns the value of attribute extgstates.



4
5
6
# File 'lib/pdf/inspector/extgstate.rb', line 4

def extgstates
  @extgstates
end

Instance Method Details

#page=(page) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/pdf/inspector/extgstate.rb', line 10

def page=(page)
  page.graphic_states.each do |_label, stream|
    @extgstates << {
      opacity: stream[:ca],
      stroke_opacity: stream[:CA],
      soft_mask: stream[:SMask],
      blend_mode: stream[:BM]
    }
  end
end