Add debugging messages to the Printing example and use full page to print.

[EXAMPLES]
* NEW: Add debugging messages to the Printing example and use full page to print.
This commit is contained in:
gambas 2020-04-08 14:05:12 +02:00
parent 171c11c523
commit 0f1de30f2a
3 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,4 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.7.90
Title=Printing example
Startup=FMain
Icon=printer-laser.png
@ -11,6 +10,6 @@ Description="Printing example.\n\nThis example shows how to print a text or an i
Authors="Benoît Minisini"
Environment="GB_GUI=gb.gtk3"
TabSize=2
Translate=1
Vendor=Example
Packager=1
Translate=1

View File

@ -108,6 +108,10 @@ Public Sub prtText_Draw()
Dim PRINT_MARGIN As Float = Paint.Width / prtText.PaperWidth * 10
Debug "Printing page";; prtText.Page
Debug "Paint.FontScale = "; Paint.FontScale
Debug "Paint.Font.Size = "; Paint.Font.Size
Debug "Paint.Width = "; Paint.Width
Debug "Printer.PaperWidth = "; prtText.PaperWidth
Paint.Font = Font[txtFontText.Text]
Paint.Rectangle(PRINT_MARGIN / 2, PRINT_MARGIN / 2, Paint.Width - PRINT_MARGIN, Paint.Height - PRINT_MARGIN)

View File

@ -54,6 +54,7 @@
}
{ prtText #Printer
#MoveScaled(62,31)
FullPage = True
}
Index = 1
Text = ("Image")