Class: IIIF::Image::Size::Absolute

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(width, height) ⇒ Absolute

Returns a new instance of Absolute.

Parameters:

  • width (Integer)
  • height (Integer)


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

#heightObject (readonly)

Returns the value of attribute height.



14
15
16
# File 'lib/iiif/image/size/absolute.rb', line 14

def height
  @height
end

#widthObject (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_sObject



16
17
18
# File 'lib/iiif/image/size/absolute.rb', line 16

def to_s
  "#{width},#{height}"
end