OT: PCL line background shading

Bill Vermillion fp at wjv.com
Mon Apr 12 08:50:53 PDT 2004


On Mon, Apr 12, 2004 at 11:13:40AM -0400, Jay R. Ashworth thus spoke:
> I'm about to have to reimplement a client's invoices from one-line
> greenbar preprrint forms to Laser plain paper, and as fastidious as
> this guy is about getting his printing on the lines, I *know* he's
> gonna want me to put the alternating bars on the invoices.

> Luckily, they're a full-page form not a report, so I can use a standard
> print code rather than having to stuff it into a dummy.

> Does anyone have a print code laying around that puts about a
> 10% halftone graybar in the background of the current line?

Shades of the mighty Kreskin - you must be a mind-reader - or play
one on the 'net.

Last night I was cleaning up and moving an old machine out and I
cam across a 75-100 3.5" floppies.  On was a 720K DSDD that was
cryptically labled "FP Save"

I found some code I was experimenting with and I may have used 1 of
them.  I know I used at least a part of 1 in some code for grey-bar
emulation on a group of HPs.

Some of this might be helpful.  Note the 1993 date in the code.
I always tried to inital and date my changes.

All the print code are commented.  It's crude and I never went back
and did much more to it.  It might be a start.

Bill

-- 
Bill Vermillion - bv @ wjv . com
-------------- next part --------------
:'       ' **** NOTE NOTE NOTE  **** this routines builds a very:        ' long variable  - set page width to 255 or else the:
:        ' variable will be chopped at the page edge.:        ' wjv - 4/11/93:
:        ' skip array jumps us down the page.   x holds a count:dim skip[10](6,*)ro; x(2,.0):
::gosub skipit; gosub bar:
::end:
bar:        ' this routine builds a shaded bar that is 3 lines high:        ' and 2400 dots (8") wide:
:        'pu - push cursor - put variable at top of page:pu = chr("27") { "&f0S":
:        'pop the cursor - put it back where we started this mess:po = chr("27") { "&f1S":
:' Esc * c ####a (rect wid),####v (rect ht), ##g (shade) #P (fill):bp = chr("27") { "*c2400a400v10g2P":
:        ' we now take the bar and the cursor positioning command:        ' and alternate them and put them in one variable:
:        ' there is probably a much better way to do this but:        ' this is what I came up with at the moment.:
:        ' if you wish to start the bars further down the page:        ' just do something like  in = pu { ro { rp { rq { bp:
::in = pu { bp { ro { bp { rp { bp { rq { bp { rr:
::io = bp { rs { bp { rt { bp { ru { bp { rv { bp { rw { bp { po:
::ip = in { io:
::return:
:' *********::
skipit:        '**** we build a set of 10 variable starting with ro so:        'that we effectively skip 3 blank line before we print:
:        ' the next gray box.::
loop::x = "1"; ch = "6":
loop1:'::
:        ' move by 6 times 'x' vertical CAP rows:skip[x] = chr("27") { "&a" { abs(ch*x) { "R":
:x lt "10":x = x + "1"; goto loop1:
::return:
-------------- next part --------------
::dim flg[2](1,.0):
:        'pu - push cursor - put variable at top of page:pu = chr("27") { "&f0S":
:        'pop the cursor - put it back where we started this mess:po = chr("27") { "&f1S":
:        'reverse line feed:rv = chr("27") { "&a-1R":
:' Esc * c ####a (rect wid),####v (rect ht), ##g (shade) #P (fill):bp = chr("27") { "*c2400a150v12g2P":
:flg["1"] ne "3" and flg["2"] ne "2":ip = rv { pu { bp { po; flg["1"] = flg["1"] + "1":
:flg["1"] ne "3" and flg["2"] eq "2":ip = rv { ""; flg["1"] = flg["1"] + "1":
:flg["1"] eq "3" and flg["2"] ne "2":flg["1"] = "0"; flg["2"] = "2":
:flg["1"] eq "3" and flg["2"] eq "2":flg["1"] = "0"; flg["2"] = "1":
::end:
-------------- next part --------------
::dim flg[2](1,.0):
:        'pu - push cursor - put variable at top of page:pu = chr("27") { "&f0S":
:        'pop the cursor - put it back where we started this mess:po = chr("27") { "&f1S":
:        'reverse line feed:rv = chr("27") { "&a-1R":
:' Esc * c ####a (rect wid),####v (rect ht), ##g (shade) #P (fill):bp = chr("27") { "*c2400a150v12g2P":
:flg["1"] ne "1":ip = rv { pu { bp { po:
:flg["1"] eq "1":ip = rv { "":
::gosub setflag:
::end:
setflag:::
:flg["1"] ne "1":flg["1"] = "1"; return:
:flg["1"] eq "1":flg["1"] = "0"; return:


More information about the Filepro-list mailing list