[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gambas-bugtracker] Bug #3135: Problems with the printer class in qt6 on Manjiaro and GTK on Mint 22
[Thread Prev] | [Thread Next]
- Subject: [Gambas-bugtracker] Bug #3135: Problems with the printer class in qt6 on Manjiaro and GTK on Mint 22
- From: <bugtracker@xxxxxxxxxxxxxx>
- Date: Thu, 05 Feb 2026 22:16:05 GMT
- To: gradobag@xxxxxxxxxxx,bugtracker@xxxxxxxxxxxxxxxxxxxxxx
http://gambaswiki.org/bugtracker/edit?object=BUG.3135&from=L21haW4- Comment #3 by Benoît MINISINI: OK, it's your code that is incorrect. If I fix it, everything works with QT6 and GTK+3. Replace: Paint.DrawImage(hPage, 0, 0, fWidth, fHeight) by: Paint.DrawImage(hPage, 0, 0, Paint.W, Paint.H) The size of the page for the 'Paint' class is always 'Paint.W' and 'Paint.H'. Your 'fWidth' and 'fHeight' are the size of the page in a different unit, that does not necessarily match the one used by the Paint class (which can be anything). Actually they are pixels: fWidth = Printer1.PaperWidth / 25.4 * Printer1.Resolution => unit of 'fWidth' = unit of 'Printer1.PaperWidth' / (mm / inch) * unit of 'Printer1.Resolution' = mm / (mm / inch) * (pixel / inch) = mm / mm * inch * pixel / inch = (mm / mm) * (inch / inch) * pixel = pixel ----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----
| [Gambas-bugtracker] Bug #3135: Problems with the printer class in qt6 on Manjiaro and GTK on Mint 22 | <bugtracker@xxxxxxxxxxxxxx> |