Class: EideticPDF::PdfObjects::Rectangle
- Defined in:
- lib/epdfo.rb
Instance Attribute Summary collapse
-
#x1 ⇒ Object
readonly
Returns the value of attribute x1.
-
#x2 ⇒ Object
readonly
Returns the value of attribute x2.
-
#y1 ⇒ Object
readonly
Returns the value of attribute y1.
-
#y2 ⇒ Object
readonly
Returns the value of attribute y2.
Attributes inherited from PdfArray
Instance Method Summary collapse
-
#initialize(x1, y1, x2, y2) ⇒ Rectangle
constructor
A new instance of Rectangle.
Methods inherited from PdfArray
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
#x1 ⇒ Object (readonly)
Returns the value of attribute x1.
432 433 434 |
# File 'lib/epdfo.rb', line 432 def x1 @x1 end |
#x2 ⇒ Object (readonly)
Returns the value of attribute x2.
432 433 434 |
# File 'lib/epdfo.rb', line 432 def x2 @x2 end |
#y1 ⇒ Object (readonly)
Returns the value of attribute y1.
432 433 434 |
# File 'lib/epdfo.rb', line 432 def y1 @y1 end |
#y2 ⇒ Object (readonly)
Returns the value of attribute y2.
432 433 434 |
# File 'lib/epdfo.rb', line 432 def y2 @y2 end |