Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Faxual II for CA-Clipper - // ripex4.prg http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
//  ripex4.prg
//
//  Faxual II RIP example 4.  Draw the Faxual II logo with a fancy
//  border.
//
//  Compile with /n /w ($Clip: -nw$)
//

#define BMPLOGO "fax2logo.pcx"  // Our logo
#define OUTFILE "ripex4.tif"    // Output file name

procedure Main
    local hbmp
    local left
    local right
    local top
    local bottom

    // Load the bitmap.

    hbmp := BmLoadPCX(BMPLOGO)

    if hbmp == 0
        ? BMPLOGO + ": " + F2ErrorMessage(F2Error())
        quit
    endif

    // Create the output file.

    RipBegin(OUTFILE)

    // Center the bitmap an inch down from the top of the page.

    left   := (RipWidth() - BmWidth(hbmp)) / 2
    right  := left + BmWidth(hbmp)

    top    := 200
    bottom := top + BmLength(hbmp)

    RipDrawBitmap(left, top, hbmp)

    BmUnload(hbmp)  // Done with the bitmap.

    // Draw a fancy border around the bitmap.  The first box is 1/8"
    // outside the bitmap and 0.025" thick, the second is 1/4" outside
    // and 0.075" thick.

    RipDrawRect(left - 25, top - 25, right + 25, bottom + 25,  5)
    RipDrawRect(left - 50, top - 50, right + 50, bottom + 50, 15)

    // Cut the page off an inch below the bottom of the bitmap.

    RipEject(bottom + 200)
    RipEnd()

    return

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