Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <pgchart.h>
    short _FAR _pg_getchardef( short ch,
                               unsigned char _FAR *def );

Description:
    The _pg_getchardef function retrieves the current bit-map definition for
    the character ch.  The bit-map is placed in the array def.  The current
    font must be an 8-by-8 bit-mapped font.

Returns:
    The _pg_getchardef function returns zero if successful; otherwise, a
    non-zero value is returned.

Example:
    #include <graph.h>
    #include <pgchart.h>
    #include <string.h>
    #include <conio.h>

    #define NUM_VALUES 4

    float x[ NUM_VALUES ] = {
        5, 25, 45, 65
    };

    float y[ NUM_VALUES ] = {
        5, 45, 25, 65
    };

    char diamond[ 8 ] = {
        0x10, 0x28, 0x44, 0x82, 0x44, 0x28, 0x10, 0x00
    };

    main()
    {
        chartenv env;
        char old_def[ 8 ];

        _setvideomode( _VRES16COLOR );
        _pg_initchart();
        _pg_defaultchart( &env,
                          _PG_SCATTERCHART, _PG_POINTANDLINE );
        strcpy( env.maintitle.title, "Scatter Chart" );
        /* change asterisk character to diamond */
        _pg_getchardef( '*', old_def );
        _pg_setchardef( '*', diamond );
        _pg_chartscatter( &env, x, y, NUM_VALUES );
        _pg_setchardef( '*', old_def );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

See Also:
    _pg_defaultchart, _pg_initchart, _pg_chart, _pg_chartpie,
    _pg_chartscatter, _pg_setchardef

See Also: _pg_defaultchart _pg_initchart

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