From a22eba2b38dd83d1244640b8ef3d2b73bd794147 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 15 May 2013 13:42:19 +0000 Subject: Fixes Fl_System_Printer::printable_rect() and Fl_System_Printer::margins() that did not work well after calls to Fl_System_Printer::translate() under MSWindows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9917 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_GDI_Printer.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Fl_GDI_Printer.cxx b/src/Fl_GDI_Printer.cxx index 00f40eb29..edeb86ef6 100644 --- a/src/Fl_GDI_Printer.cxx +++ b/src/Fl_GDI_Printer.cxx @@ -132,8 +132,11 @@ void Fl_System_Printer::absolute_printable_rect(int *x, int *y, int *w, int *h) { POINT physPageSize; POINT pixelsPerInch; + XFORM transform; if (hPr == NULL) return; + GetWorldTransform(fl_gc, &transform); + ModifyWorldTransform(fl_gc, NULL, MWT_IDENTITY); SetWindowOrgEx(fl_gc, 0, 0, NULL); physPageSize.x = GetDeviceCaps(hPr, HORZRES); @@ -152,6 +155,7 @@ void Fl_System_Printer::absolute_printable_rect(int *x, int *y, int *w, int *h) *x = left_margin; *y = top_margin; origin(x_offset, y_offset); + SetWorldTransform(fl_gc, &transform); } void Fl_System_Printer::margins(int *left, int *top, int *right, int *bottom) -- cgit v1.2.3