User Tools

Site Tools


improving_20the_20print_20quality

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
improving_20the_20print_20quality [2018/03/31 13:19] – external edit 127.0.0.1improving_20the_20print_20quality [2024/01/05 00:22] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 //by Richard Russell, February 2014//\\ \\  (see also [[/High%20quality%20hardcopy%20output%20%28LBB%29|High quality hardcopy output (LBB)]])\\ \\ **LB Booster** uses a conventional double-buffered method of outputting graphics: objects, images, text etc. are drawn to a 'memory' bitmap which is then blitted to the screen when required. This has the advantage that graphics automatically 'stick', that is they are redrawn when a window is restored or uncovered, without any extra effort by the programmer.\\ \\  In LBB there is no need to use **flush**, **discard**, **segment**, **delsegment** etc. to manage graphics segments (although those commands will do no harm if you leave them in the program for compatibility with LB). You cannot run out of memory, or cause your program to slow down, if you are outputting animated graphics and don't follow the rules correctly.\\ \\  There is however one disadvantage of using this conventional scheme: when you dump a graphics window to the printer (**"print"** command) the resulting quality on the paper will be no better than it was on the screen. Commonly this will not be noticeable, especially if your screen has a relatively high resolution and your printer driver does its job well. But occasionally the reduction of quality may be apparent, especially on small sized text.\\ \\  If this is an issue there is a relatively straightforward solution. Below is listed a modified version of the **printform.bas** program supplied with Liberty BASIC. Instead of using the native **"print"** command it creates a metafile, which it then outputs to the printer. The program behaves exactly like the original, but the quality of the printed output from LBB will be identical to what it would be from Liberty BASIC itself.\\ \\  This technique has another advantage, in that there is no need to output the graphics to the screen at all if you don't want to. If you delete the section labelled //Display the metafile (optional)// the graphics will be sent only to the printer:\\ \\  //by Richard Russell, February 2014//\\ \\  (see also [[/High%20quality%20hardcopy%20output%20%28LBB%29|High quality hardcopy output (LBB)]])\\ \\ **LB Booster** uses a conventional double-buffered method of outputting graphics: objects, images, text etc. are drawn to a 'memory' bitmap which is then blitted to the screen when required. This has the advantage that graphics automatically 'stick', that is they are redrawn when a window is restored or uncovered, without any extra effort by the programmer.\\ \\  In LBB there is no need to use **flush**, **discard**, **segment**, **delsegment** etc. to manage graphics segments (although those commands will do no harm if you leave them in the program for compatibility with LB). You cannot run out of memory, or cause your program to slow down, if you are outputting animated graphics and don't follow the rules correctly.\\ \\  There is however one disadvantage of using this conventional scheme: when you dump a graphics window to the printer (**"print"** command) the resulting quality on the paper will be no better than it was on the screen. Commonly this will not be noticeable, especially if your screen has a relatively high resolution and your printer driver does its job well. But occasionally the reduction of quality may be apparent, especially on small sized text.\\ \\  If this is an issue there is a relatively straightforward solution. Below is listed a modified version of the **printform.bas** program supplied with Liberty BASIC. Instead of using the native **"print"** command it creates a metafile, which it then outputs to the printer. The program behaves exactly like the original, but the quality of the printed output from LBB will be identical to what it would be from Liberty BASIC itself.\\ \\  This technique has another advantage, in that there is no need to output the graphics to the screen at all if you don't want to. If you delete the section labelled //Display the metafile (optional)// the graphics will be sent only to the printer:\\ \\ 
 +<code lb>
       'printform.bas       'printform.bas
       'This example program shows how to use a graphics window to produce       'This example program shows how to use a graphics window to produce
Line 130: Line 131:
       close #form       close #form
       end       end
 +</code>
improving_20the_20print_20quality.1522502364.txt.gz · Last modified: 2024/01/05 00:17 (external edit)