Author Topic: Lazarus Printer  (Read 170 times)

Neville

  • Jr. Member
  • **
  • Posts: 59
Lazarus Printer
« on: September 19, 2026, 03:36:36 pm »
I'm just getting started with the Lazarus Printer and have learned how to place items on the canvas.

My immediate need is to know how to switch output from screen to printer, and back.  This is so that the user can verify what's being designed before committing to print.

Thanks

cdbc

  • Hero Member
  • *****
  • Posts: 2974
    • http://www.cdbc.dk
Re: Lazarus Printer
« Reply #1 on: September 19, 2026, 03:40:31 pm »
Hi
Since both screen and printer are rendering on a canvas, I'd form my rendering engine to take a canvas as param and then I can feed both screen and printer canvas to it, reducing the headaches to merely a /scaling/ issue...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

jamie

  • Hero Member
  • *****
  • Posts: 8071
Re: Lazarus Printer
« Reply #2 on: September 19, 2026, 04:57:11 pm »
To add what Benny stated.

 I pass a Canvas object to a master routine and while in it, I can test for the canvas class TPrinterCanvans or TCanvas to determine what is being passed.

 Of course you could also pass a flag parameter too.

 of course you could always design the layout on a Tbitmap and them use a stretch draw to the printer, since printers in many cases have more Dots on them.


Jamie
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018