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 - // ripex1.prg http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
//  ripex1.prg
//
//  Faxual II RIP example 1.  Print "Hello, world!" centered on a short
//  page.
//
//  Compile with /n /w ($Clip: -nw$)
//

#define SYSFONT "sys20x32.xfb"  // Stock fixed-pitch font
#define OUTFILE "ripex1.tif"    // Output file name

procedure Main
    local hfont

    // Load the font.

    hfont := FontLoadXFB(SYSFONT)

    if hfont == 0
        ? SYSFONT + ": " + F2ErrorMessage(F2Error())
        quit
    endif

    // Set units to inches.  You can call RipUnit even when the RIP is
    // not initialized.

    RipUnit(200)

    // Create the output file.  Use default width but make it only
    // four inches long, high resolution.  Use the font we just loaded.

    RipBegin(OUTFILE, 0, 4)
    RipFont(hfont)

    // Center the message two inches from the top of the page.

    RipCJust(RipWidth() / 2, 2, "Hello, world!")

    // Write the page out, and finish the file off.

    RipEject()
    RipEnd()

    // Unload the font.  Not strictly necessary since the program is
    // about to end, but good practice.

    FontUnload(hfont)

    return

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