summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-01 18:03:10 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-06 20:28:20 +0200
commitf09e17c3c564e8310125a10c03397cbf473ff643 (patch)
tree8d0fd4a28e3686c33aaa140d07ddba26ab28bdc2 /src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
parentb0e0c355edaa2e23148cb0260ada907aec930f05 (diff)
Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
index 59c15685f..2e808f1f5 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Printing support for Windows for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2020 by Bill Spitzak and others.
@@ -11,9 +9,9 @@
//
// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// https://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
#include "../GDI/Fl_GDI_Graphics_Driver.H"
@@ -72,12 +70,12 @@ Fl_WinAPI_Printer_Driver::~Fl_WinAPI_Printer_Driver(void) {
static void WIN_SetupPrinterDeviceContext(HDC prHDC)
{
if ( !prHDC ) return;
-
+
fl_window = 0;
SetGraphicsMode(prHDC, GM_ADVANCED); // to allow for rotations
SetMapMode(prHDC, MM_ANISOTROPIC);
SetTextAlign(prHDC, TA_BASELINE|TA_LEFT);
- SetBkMode(prHDC, TRANSPARENT);
+ SetBkMode(prHDC, TRANSPARENT);
// this matches 720 logical units to the number of device units in 10 inches of paper
// thus the logical unit is the point (= 1/72 inch)
SetWindowExtEx(prHDC, 720, 720, NULL);
@@ -92,7 +90,7 @@ int Fl_WinAPI_Printer_Driver::begin_job (int pagecount, int *frompage, int *topa
DOCINFO di;
char docName [256];
int err = 0;
-
+
abortPrint = FALSE;
memset (&pd, 0, sizeof (PRINTDLG));
pd.lStructSize = sizeof (PRINTDLG);
@@ -166,7 +164,7 @@ void Fl_WinAPI_Printer_Driver::end_job (void)
if (! abortPrint) {
prerr = EndDoc (hPr);
if (prerr < 0) {
- fl_alert ("EndDoc error %d", prerr);
+ fl_alert ("EndDoc error %d", prerr);
}
}
DeleteDC (hPr);
@@ -184,14 +182,14 @@ void Fl_WinAPI_Printer_Driver::absolute_printable_rect(int *x, int *y, int *w, i
{
POINT physPageSize;
POINT pixelsPerInch;
- XFORM transform;
-
+ XFORM transform;
+
if (hPr == NULL) return;
HDC gc = (HDC)driver()->gc();
GetWorldTransform(gc, &transform);
ModifyWorldTransform(gc, NULL, MWT_IDENTITY);
SetWindowOrgEx(gc, 0, 0, NULL);
-
+
physPageSize.x = GetDeviceCaps(hPr, HORZRES);
physPageSize.y = GetDeviceCaps(hPr, VERTRES);
DPtoLP(hPr, &physPageSize, 1);
@@ -204,7 +202,7 @@ void Fl_WinAPI_Printer_Driver::absolute_printable_rect(int *x, int *y, int *w, i
*w -= (pixelsPerInch.x / 2);
top_margin = (pixelsPerInch.y / 4);
*h -= (pixelsPerInch.y / 2);
-
+
*x = left_margin;
*y = top_margin;
origin(x_offset, y_offset);
@@ -231,7 +229,7 @@ int Fl_WinAPI_Printer_Driver::printable_rect(int *w, int *h)
int Fl_WinAPI_Printer_Driver::begin_page (void)
{
int rsult, w, h;
-
+
rsult = 0;
if (hPr != NULL) {
WIN_SetupPrinterDeviceContext (hPr);
@@ -279,7 +277,7 @@ void Fl_WinAPI_Printer_Driver::rotate (float rot_angle)
int Fl_WinAPI_Printer_Driver::end_page (void)
{
int rsult;
-
+
rsult = 0;
if (hPr != NULL) {
prerr = EndPage (hPr);
@@ -332,7 +330,3 @@ void Fl_WinAPI_Printer_Driver::origin(int *x, int *y)
{
Fl_Paged_Device::origin(x, y);
}
-
-//
-// End of "$Id$".
-//