def point_and_mask_to_points(point, mask)
      {
        x1: point[:x],
        y1: point[:y],
        x2: point[:x] + mask[:width],
        y2: point[:y] + mask[:height]
      }
    end
def point_and_mask_to_points(point, mask)
      {
        x1: point[:x],
        y1: point[:y],
        x2: point[:x] + mask[:width],
        y2: point[:y] + mask[:height]
      }
    end
Given a point as a Hash with :x and :y, and a mask with
 :width and :height, this function returns the area on the
 underlying canvas as a Hash of two points