Sha256: d799d333b786a19f1b92da6df0ef3325220cc16cd6a81b1e74ea8c87f6cf0d88

Contents?: true

Size: 460 Bytes

Versions: 7

Compression:

Stored size: 460 Bytes

Contents

# coding: utf-8
# typed: strict
# frozen_string_literal: true

module PDF
  class Reader

    # PDFs are all about positioning content on a page, so there's lots of need to
    # work with a set of X,Y coordinates.
    #
    class Point

      attr_reader :x, :y

      def initialize(x, y)
        @x, @y = x, y
      end

      def ==(other)
        other.respond_to?(:x) && other.respond_to?(:y) && x == other.x && y == other.y
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pdf-reader-2.13.0 lib/pdf/reader/point.rb
pdf-reader-2.12.0 lib/pdf/reader/point.rb
pdf-reader-2.11.0 lib/pdf/reader/point.rb
pdf-reader-2.10.0 lib/pdf/reader/point.rb
pdf-reader-2.9.2 lib/pdf/reader/point.rb
pdf-reader-2.9.1 lib/pdf/reader/point.rb
pdf-reader-2.9.0 lib/pdf/reader/point.rb