func (self Rectangle) Intersect(r2 Rectangle) (bool, Rectangle) { var cr3 C.GdkRectangle cr1 := nativeFromRectangle(self) defer cr1.Free() cr2 := nativeFromRectangle(r2) defer cr2.Free() b := C.gdk_rectangle_intersect((*C.GdkRectangle)(cr1.GetPtr()), (*C.GdkRectangle)(cr2.GetPtr()), &cr3) rec := newRectangleFromNative(unsafe.Pointer(&cr3)).(Rectangle) return gobject.GoBool(unsafe.Pointer(&b)), rec }
/* Calculates the intersection of two rectangles. It is allowed for @dest to be the same as either @src1 or @src2. If the rectangles do not intersect, @dest’s width and height is set to 0 and its x and y values are undefined. If you are only interested in whether the rectangles intersect, but not in the intersecting area itself, pass %NULL for @dest. */ func RectangleIntersect(src1 *C.GdkRectangle, src2 *C.GdkRectangle) (dest C.GdkRectangle, return__ bool) { var __cgo__return__ C.gboolean __cgo__return__ = C.gdk_rectangle_intersect(src1, src2, &dest) return__ = __cgo__return__ == C.gboolean(1) return }