Gimp.rectangle_intersect

function rectangle_intersect(x1: Number(gint), y1: Number(gint), width1: Number(gint), height1: Number(gint), x2: Number(gint), y2: Number(gint), width2: Number(gint), height2: Number(gint)): [ok: Boolean, dest_x: Number(gint), dest_y: Number(gint), dest_width: Number(gint), dest_height: Number(gint)] {
    // Gjs wrapper for gimp_rectangle_intersect()
}
  

Calculates the intersection of two rectangles.

Since 2.4

x1

origin of first rectangle

y1

origin of first rectangle

width1

width of first rectangle

height1

height of first rectangle

x2

origin of second rectangle

y2

origin of second rectangle

width2

width of second rectangle

height2

height of second rectangle

ok

true if the intersection is non-empty, false otherwise

dest_x

return location for origin of intersection, or null

dest_y

return location for origin of intersection, or null

dest_width

return location for width of intersection, or null

dest_height

return location for height of intersection, or null