Class: EideticPDF::PdfObjects::Rectangle

Inherits:
PdfArray
  • Object
show all
Defined in:
lib/epdfo.rb

Instance Attribute Summary collapse

Attributes inherited from PdfArray

#values, #wrap

Instance Method Summary collapse

Methods inherited from PdfArray

#==, #each, #eql?, #to_s

Constructor Details

#initialize(x1, y1, x2, y2) ⇒ Rectangle

Returns a new instance of Rectangle.



434
435
436
437
# File 'lib/epdfo.rb', line 434

def initialize(x1, y1, x2, y2)
  super([x1, y1, x2, y2].map { |i| PdfInteger.new(i) })
  @x1, @y1, @x2, @y2 = x1, y1, x2, y2
end

Instance Attribute Details

#x1Object (readonly)

Returns the value of attribute x1.



432
433
434
# File 'lib/epdfo.rb', line 432

def x1
  @x1
end

#x2Object (readonly)

Returns the value of attribute x2.



432
433
434
# File 'lib/epdfo.rb', line 432

def x2
  @x2
end

#y1Object (readonly)

Returns the value of attribute y1.



432
433
434
# File 'lib/epdfo.rb', line 432

def y1
  @y1
end

#y2Object (readonly)

Returns the value of attribute y2.



432
433
434
# File 'lib/epdfo.rb', line 432

def y2
  @y2
end