Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Sunshow Pro V3.0 - <b>canonscr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CanonSCR()

Prints a graphic screen image on an Canon Bubble Jet or compatible printer


Syntax

CanonSCR(<cDevStr>, <nDPI>, <nLeft>, <nTop>, ;
   <nNewWidth>, <nNewHeight>, <nBrightness>, ;
   <nPageSize>, [<nOptions>])


Arguments

<cDevStr>
Output device string:"lpt<n>", "com<n>", "prn", "file:<FILE>".

<nDPI>
Dots per inch to print at (360, 180, 60).

<nLeft>
Left offset into the page in inches.

<nTop>
Top offset into the page in inches.

<nNewWidth>
New print width in inches.

<nNewHeight>
New print height in inches.

<nBrightness>
Change brightness value between -255 dark to 255 light. 
Suggested value: 60.

<nPageSize>
Set page height in inches (11", 14", or 17").

<nOptions>
FORMFEED, FASTFLAG.


Returns

0
Success.

-1
Cannot print this graphic mode.

-2
Cannot allocate memory for line buffers.

-4
Print terminated by user.

-5
Printer does not acknowledge.

-6
Printer is out of paper.

-7
Printer timeout error.

-9
<cDevStr> must be "lpt<n>", "com<n>", "prn", "file:<FILE>".

-10
<nDPI> must be 360, 180, or 60.

-11
<nLeft> plus <nNewWidth> must be less than 11.0".

-12
<nTop> plus <nNewHeight> must be less than 17.0".

-13
<nBrightness> should be between -255 and 255.

-14
<nPageSize> should be 11", 14", or 17".

-99
Parameters are invalid.


Remarks

CanonSCR() prints a displayed image on Canon Bubble Jet Color printers 
(BJC-800 and BJC-820) in graphic mode. Form feed disabling and fastflag 
are optional. You must set brightness, port, or file.

The function should be called while the image is displayed. You must use 
TextMode() (part of Sushow, standard edition) to reset the video card to 
text mode.

The BJC-800/820 supports cut sheet, plain and coated paper, envelopes, and 
transparencies up to 11.7" x 17.0". The Canon BJC-800 has a Centronics 
parallel interface, with an optional, separate SCSI board available, while 
the BJC-820 has both Centronics parallel and SCSI interfaces. Sunshow Pro 
currently does not support the SCSI interfaces. Epson LQ-2550, LQ-Color, 
LQ-1050 (monochrome only), and LQ-850 (monochrome only) emulations are 
available. Plain paper is suitable for text only, coated paper is required 
for maximum presentation quality, especially for images. Canon accepts A4, 
A3, letter, legal, and ledger size paper.


Example

To print ASMUSSEN.PCX 4.0" x 3.0" at 360 dpi with a left margin of 1.75 
inches and a top margin of 3.5 inches in the approximate center of the page:

nStatus = ShowPCX("ASMUSSEN.PCX")
nStatus = CanonSCR("lpt1", 360, 1.75, 3.5, 4, 3, ;
    60, 11, FASTFLAG + FORMFEED)
IF nStatus < 0
    nStatus2 = TextMode() && Need to be in text mode to
                          && see the error text.
    DO CASE
    CASE nStatus = -1
        ? "Cannot print in this graphic mode"
    CASE nStatus = -2
        ? "Cannot allocate memory for line buffers"
    CASE nStatus = -4
        ? "Print terminated by user"
    CASE nStatus = -5
        ? "Printer does not acknowledge"
    CASE nStatus = -6
        ? "Printer is out of paper"
    CASE nStatus = -7
        ? "Printer timeout error"
    CASE nStatus = -9
        ? "cDevStr must be lpt<N>, com<N>, prn, " + ;
          "file:<FILE>"
    CASE nStatus = -10
        ? "nDPI must be 360, 180, or 60"
    CASE nStatus = -11
        ? "nLeft plus nNewWidth must be less than 11.0"
    CASE nStatus = -12
        ? "nTop plus nNewHeight must be less than 17.0"
    CASE nStatus = -13
        ? "nBrightness should be between -255 and 255"
    CASE nStatus = -14
        ? "nPageSize should be 11, 14, or 17"
    CASE nStatus = -99
        ? "Parameters are invalid"
    ENDCASE
    RETURN
ENDIF
nStatus2 = TextMode()



See Also: CanonGIF() CanonPCX()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson