Sha256: 87f50c874ff689682c9cd640b2b504532fcb32b8dc0b9e7266b78dd201bc5859

Contents?: true

Size: 473 Bytes

Versions: 12

Compression:

Stored size: 473 Bytes

Contents

module IIIF::Image
  module Size
    # The image content is scaled for the best fit such that the resulting width and
    # height are less than or equal to the requested width and height.
    class BestFit
      # @param [Integer] width
      # @param [Integer] height
      def initialize(width, height)
        @width = width
        @height = height
      end

      attr_reader :height, :width

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

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
iiif-image-api-0.3.0 lib/iiif/image/size/best_fit.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/iiif-image-api-0.2.0/lib/iiif/image/size/best_fit.rb
iiif-image-api-0.2.0 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.1.0 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.0.8 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.0.7 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.0.6 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.0.5 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.0.4 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.0.3 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.0.2 lib/iiif/image/size/best_fit.rb
iiif-image-api-0.0.1 lib/iiif/image/size/best_fit.rb