summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-07-17 19:56:17 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-07-17 19:56:17 (GMT)
commit3b32c45a371ed2aae882f770c71a47e6e196a6dc (patch)
tree34f259df0149bdaad3aaa66fc3fc7e7e0a4d04c9 /macosx
parent6ec6cf0d78478cb29891c5b96cbaabc605952fbb (diff)
parent63d4fcc37a6c1a0627064685179c8d4ec97a0217 (diff)
downloadtk-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.c24
-rw-r--r--macosx/tkMacOSXXStubs.c24
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;
-}
/*
*----------------------------------------------------------------------
*