Sha256: a186792b4ac45ddb5982d310199a04f76797a1eb8a23b17f6f08c9f29f20fa17

Contents?: true

Size: 599 Bytes

Versions: 5

Compression:

Stored size: 599 Bytes

Contents

module IIIF::Image
  module Region
    # Represents an absolute specified region
    class Absolute
      # @param [Integer] x
      # @param [Integer] y
      # @param [Integer] width
      # @param [Integer] height
      def initialize(x, y, width, height)
        @offset_x = x
        @offset_y = y
        @width = width
        @height = height
      end

      attr_reader :offset_x, :offset_y, :width, :height

      def dimensions
        Dimension.new(width: width, height: height)
      end

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

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
iiif-image-api-0.3.0 lib/iiif/image/region/absolute.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/iiif-image-api-0.2.0/lib/iiif/image/region/absolute.rb
iiif-image-api-0.2.0 lib/iiif/image/region/absolute.rb
iiif-image-api-0.1.0 lib/iiif/image/region/absolute.rb
iiif-image-api-0.0.8 lib/iiif/image/region/absolute.rb