diff options
author | fvogel <fvogelnew1@free.fr> | 2023-07-17 19:56:17 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-07-17 19:56:17 (GMT) |
commit | 3b32c45a371ed2aae882f770c71a47e6e196a6dc (patch) | |
tree | 34f259df0149bdaad3aaa66fc3fc7e7e0a4d04c9 /macosx | |
parent | 6ec6cf0d78478cb29891c5b96cbaabc605952fbb (diff) | |
parent | 63d4fcc37a6c1a0627064685179c8d4ec97a0217 (diff) | |
download | tk-3b32c45a371ed2aae882f770c71a47e6e196a6dc.zip tk-3b32c45a371ed2aae882f770c71a47e6e196a6dc.tar.gz tk-3b32c45a371ed2aae882f770c71a47e6e196a6dc.tar.bz2 |
Fix [f9eddb541a]: Improve TkSetRegion(); implement XSetClipRectangles() on Windows and improve it. Thanks to Christopher Chavez.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXRegion.c | 24 | ||||
-rw-r--r-- | macosx/tkMacOSXXStubs.c | 24 |
2 files changed, 24 insertions, 24 deletions
diff --git a/macosx/tkMacOSXRegion.c b/macosx/tkMacOSXRegion.c index 6f0cd0a..25af2fd 100644 --- a/macosx/tkMacOSXRegion.c +++ b/macosx/tkMacOSXRegion.c @@ -478,6 +478,30 @@ XOffsetRegion( /* *---------------------------------------------------------------------- * + * TkpCopyRegion -- + * + * Makes the destination region a copy of the source region. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +void +TkpCopyRegion( + TkRegion dst, + TkRegion src) +{ + ChkErr(HIShapeSetWithShape, (HIMutableShapeRef)dst, (HIShapeRef)src); +} + +/* + *---------------------------------------------------------------------- + * * TkMacOSXHIShapeCreateEmpty, TkMacOSXHIShapeCreateMutableWithRect, * TkMacOSXHIShapeSetWithShape, * TkMacOSHIShapeDifferenceWithRect, TkMacOSHIShapeUnionWithRect, diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index c4df49e..76b8b33 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -880,30 +880,6 @@ XForceScreenSaver( return Success; } -int -XSetClipRectangles( - Display *d, - GC gc, - int clip_x_origin, - int clip_y_origin, - XRectangle* rectangles, - int n, - TCL_UNUSED(int)) -{ - TkRegion clipRgn = TkCreateRegion(); - - while (n--) { - XRectangle rect = *rectangles; - - rect.x += clip_x_origin; - rect.y += clip_y_origin; - TkUnionRectWithRegion(&rect, clipRgn, clipRgn); - rectangles++; - } - TkSetRegion(d, gc, clipRgn); - TkDestroyRegion(clipRgn); - return 1; -} /* *---------------------------------------------------------------------- * |