Class: RustPdf::PdfRect
- Inherits:
-
Struct
- Object
- Struct
- RustPdf::PdfRect
- Defined in:
- lib/rustpdf.rb
Overview
A rectangle in PDF user space (points, origin lower-left). Used for a page's MediaBox/CropBox. #width / #height are the (non-negative) extents.
Instance Attribute Summary collapse
-
#x0 ⇒ Object
Returns the value of attribute x0.
-
#x1 ⇒ Object
Returns the value of attribute x1.
-
#y0 ⇒ Object
Returns the value of attribute y0.
-
#y1 ⇒ Object
Returns the value of attribute y1.
Instance Method Summary collapse
Instance Attribute Details
#x0 ⇒ Object
Returns the value of attribute x0
204 205 206 |
# File 'lib/rustpdf.rb', line 204 def x0 @x0 end |
#x1 ⇒ Object
Returns the value of attribute x1
204 205 206 |
# File 'lib/rustpdf.rb', line 204 def x1 @x1 end |
#y0 ⇒ Object
Returns the value of attribute y0
204 205 206 |
# File 'lib/rustpdf.rb', line 204 def y0 @y0 end |
#y1 ⇒ Object
Returns the value of attribute y1
204 205 206 |
# File 'lib/rustpdf.rb', line 204 def y1 @y1 end |
Instance Method Details
#height ⇒ Object
209 210 211 |
# File 'lib/rustpdf.rb', line 209 def height (y1 - y0).abs end |
#width ⇒ Object
205 206 207 |
# File 'lib/rustpdf.rb', line 205 def width (x1 - x0).abs end |