Function get_index_from_point_and_shape

Source
pub fn get_index_from_point_and_shape(
    point: Point,
    shape: &Shape,
) -> Result<usize, Error>
Expand description

Just a wrapper over get_index_from_xyshape

§Arguments

  • point - The point containing (x, y) coordinate
  • shape - The shape of the rect this point is currently in

§Returns

  • usize containing Index if within bounds, otherwise Error