Sha256: d630d954ee2462f593881f90e6679b1d4cb095e7b5d2710036ee7c5d47cc981e

Contents?: true

Size: 676 Bytes

Versions: 2

Compression:

Stored size: 676 Bytes

Contents

module Riiif
  module Region
    # Represents an absolute specified region
    class Absolute < Crop
      # TODO: only kakadu needs image_info. So there's potenial to optimize by
      # making image_info a proxy that fetches the info lazily when needed.
      # @param [ImageInformation] image_info
      # @param [String] x
      # @param [String] y
      # @param [String] width
      # @param [String] height
      def initialize(image_info, x, y, width, height)
        @image_info = image_info
        @offset_x = x.to_i
        @offset_y = y.to_i
        @width = width.to_i
        @height = height.to_i
      end

      attr_reader :width, :height
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
riiif-2.0.0.beta2 app/services/riiif/region/absolute.rb
riiif-2.0.0.beta1 app/services/riiif/region/absolute.rb