Class: PDF::Inspector::Graphics::Rectangle

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from PDF::Inspector

analyze, analyze_file, parse

Constructor Details

#initializeRectangle

Returns a new instance of Rectangle.



28
29
30
# File 'lib/pdf/inspector/graphics.rb', line 28

def initialize
  @rectangles = []
end

Instance Attribute Details

#rectanglesObject (readonly)

Returns the value of attribute rectangles.



26
27
28
# File 'lib/pdf/inspector/graphics.rb', line 26

def rectangles
  @rectangles
end

Instance Method Details

#append_rectangle(*params) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/pdf/inspector/graphics.rb', line 32

def append_rectangle(*params)
  @rectangles << {
    point: params[0..1],
    width: params[2],
    height: params[3]
  }
end