Sha256: a1e5c48b333de2457f4648322ea723ad6e3f3c8920fee7e0b56c687ad8e60e87
Contents?: true
Size: 584 Bytes
Versions: 12
Compression:
Stored size: 584 Bytes
Contents
module IIIF::Image module Size # The image or region should be scaled so that its height is exactly equal # to the provided parameter, and the width will be a calculated value that # maintains the aspect ratio of the extracted region class Height # @param [Integer] height def initialize(height) @height = height end attr_reader :height # @param ratio [Rational] the aspect ratio def width_for_aspect_ratio(ratio) (ratio * height).round end def to_s ",#{height}" end end end end
Version data entries
12 entries across 12 versions & 2 rubygems