2018-12-23 12:14:25 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
module Gitlab
|
|
|
|
module Diff
|
|
|
|
class ImagePoint
|
|
|
|
attr_reader :width, :height, :x, :y
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
def initialize(width, height, new_x, new_y)
|
2018-03-17 18:26:18 +05:30
|
|
|
@width = width
|
|
|
|
@height = height
|
2018-11-18 11:00:15 +05:30
|
|
|
@x = new_x
|
|
|
|
@y = new_y
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def to_h
|
|
|
|
{
|
|
|
|
width: width,
|
|
|
|
height: height,
|
|
|
|
x: x,
|
|
|
|
y: y
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|