diff options
-rw-r--r-- | macosx/tkMacOSXPrint.c | 8 |
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]; |