Beispiel #1
0
int
TkRectInRegion(
    TkRegion region,
    int x,
    int y,
    unsigned int width,
    unsigned int height)
{
    int result;
    const CGRect r = CGRectMake(x, y, width, height);

    result = HIShapeIntersectsRect((HIShapeRef) region, &r) ?
	    RectanglePart : RectangleOut;
    return result;
}
int
TkRectInRegion(
    TkRegion region,
    int x,
    int y,
    unsigned int width,
    unsigned int height)
{
    if ( TkMacOSXIsEmptyRegion(region) ) {
	    return RectangleOut;
	}
    else {
	const CGRect r = CGRectMake(x, y, width, height);
	return HIShapeIntersectsRect((HIShapeRef) region, &r) ?
	    RectanglePart : RectangleOut;
    }
}