Zebra API Doc

zebra.util.intersection();

intersection

(
  • x1
  • y1
  • w1
  • h1
  • x2
  • y2
  • w2
  • h2
  • r
)

Compute intersection of the two given rectangular areas

Parameters:

  • x1 Integer

    a x coordinate of the first rectangular area

  • y1 Integer

    a y coordinate of the first rectangular area

  • w1 Integer

    a width of the first rectangular area

  • h1 Integer

    a height of the first rectangular area

  • x2 Integer

    a x coordinate of the first rectangular area

  • y2 Integer

    a y coordinate of the first rectangular area

  • w2 Integer

    a width of the first rectangular area

  • h2 Integer

    a height of the first rectangular area

  • r Object

    an object to store result

     { x: {Integer}, y:{Integer}, width:{Integer}, height:{Integer} }