summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXPrint.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2023-10-19 12:02:35 (GMT)
committerKevin Walzer <kw@codebykevin.com>2023-10-19 12:02:35 (GMT)
commitc0e45b40469bfd9e19a65b7e17109f5eb7cbad3a (patch)
treefc771b3871dff84f6281b65fa56ae56ef14bca57 /macosx/tkMacOSXPrint.c
parent93122cd41397000b831f0e8768e316e8dba4c791 (diff)
downloadtk-c0e45b40469bfd9e19a65b7e17109f5eb7cbad3a.zip
tk-c0e45b40469bfd9e19a65b7e17109f5eb7cbad3a.tar.gz
tk-c0e45b40469bfd9e19a65b7e17109f5eb7cbad3a.tar.bz2
Fix for [5423699f10]
Diffstat (limited to 'macosx/tkMacOSXPrint.c')
-rw-r--r--macosx/tkMacOSXPrint.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/macosx/tkMacOSXPrint.c b/macosx/tkMacOSXPrint.c
index 727d617..0e2b34a 100644
--- a/macosx/tkMacOSXPrint.c
+++ b/macosx/tkMacOSXPrint.c
@@ -346,14 +346,13 @@ FinishPrint(
*/
int MakePDF
-(void *clientData,
+(TCL_UNUSED(ClientData),
Tcl_Interp *ip,
int objc,
Tcl_Obj *const objv[])
{
Tk_Window path;
- Drawable d = NULL;
- int x, y;
+ Drawable d;
unsigned int width, height;
CFDataRef pdfData;
@@ -374,9 +373,8 @@ int MakePDF
d = Tk_WindowId(path);
width = Tk_Width(path);
height = Tk_Height(path);
- MacDrawable *mac_drawable = (MacDrawable *)d;
- pdfData = CreatePDFFromDrawableRect(mac_drawable, 0, 0, width, height);
+ pdfData = CreatePDFFromDrawableRect(d, 0, 0, width, height);
NSData *viewData = (NSData*)pdfData;
[viewData writeToFile:@"/tmp/tk_canvas.pdf" atomically:YES];