diff options
| author | Manolo Gouy <Manolo> | 2013-05-15 13:42:19 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2013-05-15 13:42:19 +0000 |
| commit | a22eba2b38dd83d1244640b8ef3d2b73bd794147 (patch) | |
| tree | bd4e07b5a8eeea978dfce09f0de74db2e732b407 /src | |
| parent | 0d04ce9f58f3de2794b891890262e9788b2144f7 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_GDI_Printer.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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) |
