Class: IIIF::Image::Size::Absolute
- Inherits:
-
Object
- Object
- IIIF::Image::Size::Absolute
- Defined in:
- lib/iiif/image/size/absolute.rb
Overview
The width and height of the returned image are exactly w and h. The aspect ratio of the returned image may be different than the extracted region, resulting in a distorted image.
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width, height) ⇒ Absolute
constructor
A new instance of Absolute.
- #to_s ⇒ Object
Constructor Details
#initialize(width, height) ⇒ Absolute
Returns a new instance of Absolute.
9 10 11 12 |
# File 'lib/iiif/image/size/absolute.rb', line 9 def initialize(width, height) @width = width @height = height end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
14 15 16 |
# File 'lib/iiif/image/size/absolute.rb', line 14 def height @height end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
14 15 16 |
# File 'lib/iiif/image/size/absolute.rb', line 14 def width @width end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/iiif/image/size/absolute.rb', line 16 def to_s "#{width},#{height}" end |