/****************************************************************
 * Filename  :	Context.c
 * Functions :	
 *		Context_New
 *		Context_Delete
 *		Context_Initialize
 *		Context_SetColors
 *		Context_GetColors
 *		Context_GetFont
 *		Context_SetFont
 *		Context_GetMode
 *		Context_SetMode
 * Purpose   : 	Functions for the Context class
 $Revision: 1.1 $
 ***************************************************************/
#include "dmvideo.h"                    /* definitions for Data Manager       */
#include "OVtypes.h"                    /* video overlay type definitions     */
#include "Context.h" 			/* definitions for Context class      */

/*---------------------------------------------------------------
 | Function  :	Context_New
 | Purpose   : 	Return a new context structure
 | Inputs    :	none
 | Outputs   :	none
 | Side FX   :	none
 | comments  :
 | Author    :	sylvain.coudray MBARI-IFREMER/diti/dsi/ie
 ---------------------------------------------------------------*/
    OV_Context*
Context_New(Void)
{
    OV_Context 	*p_context;		/* a graphic context */

    p_context = (OV_Context *) malloc ( sizeof(OV_Context));

    return (p_context);

} /* Context_New */

/*---------------------------------------------------------------
 | Function  :	Context_Delete
 | Purpose   : 	Free memory from structure passed in parameter
 | Inputs    :	none
 | Outputs   :	none
 | Side FX   :	none
 | comments  :
 | Author    :	sylvain.coudray MBARI-IFREMER/diti/dsi/ie
 | Modified  :  tarrant 8/7/96
 |                to free all malloced components of structure
 ---------------------------------------------------------------*/
    void
Context_Delete(OV_Context *p_context)
{

    if (p_context->text_font != NULL)
	free(p_context->text_font);

    if (p_context->foreground_color != NULL)
	free(p_context->foreground_color);

    if (p_context->display_mode != NULL)
	free(p_context->display_mode);

    free(p_context);

    return;

} /* Context_Delete */


/*---------------------------------------------------------------
 | Function  :	Context_Initialize
 | Purpose   : 	object initialization
 | Inputs    :	none
 | Outputs   :	none
 | Side FX   :	none
 | comments  :
 | Author    :	sylvain.coudray MBARI-IFREMER/diti/dsi/ie
 ---------------------------------------------------------------*/
    void
Context_Initialize(OV_Context *p_context)
{
/*debug
printf ( " Context Initialize \n");
enddebug*/

	p_context->text_font = NULL;
	p_context->foreground_color = NULL;
	p_context->background_color = NULL;
	p_context->display_mode = NULL;
	p_context->value_format = NULL;
	p_context->line_width = NULL;
	p_context->line_style = NULL;

        return;

} /* Context_Initialize */


/*---------------------------------------------------------------
 | Function  :	Context_cccccc
 | Purpose   : 	
 | Inputs    :	none
 | Outputs   :	none
 | Side FX   :	none
 | comments  :
 | Author    :	sylvain.coudray MBARI-IFREMER/diti/dsi/ie
 ---------------------------------------------------------------*/

	void
Context_cccccc ()
{

	/* ... Local Variables */


	/* ... Initializations */


	/* ... Begin */


	/* ... End */

        return;

} /* Context_cccccc */


