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
This commit is contained in:
parent
0d04ce9f58
commit
a22eba2b38
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user