2018-11-06 04:45:35 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-07 04:25:17 +00:00
|
|
|
module Gitlab
|
|
|
|
module Diff
|
|
|
|
class ImagePoint
|
|
|
|
attr_reader :width, :height, :x, :y
|
|
|
|
|
2018-07-04 14:02:01 +00:00
|
|
|
def initialize(width, height, new_x, new_y)
|
2017-10-07 04:25:17 +00:00
|
|
|
@width = width
|
|
|
|
@height = height
|
2018-07-04 14:02:01 +00:00
|
|
|
@x = new_x
|
|
|
|
@y = new_y
|
2017-10-07 04:25:17 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def to_h
|
|
|
|
{
|
|
|
|
width: width,
|
|
|
|
height: height,
|
|
|
|
x: x,
|
|
|
|
y: y
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|