/*FILE HEADER**************************************************************
 *
 *  File name		: $Id$
 *  RCS Revision Number	: $Revision: 1.1 $
 *  Last Modified	: $Date: 94/10/28 09:23:28 $
 *  CSCI name		: Real-Time Graphics System - Applications Interface
 *  CSC name		: All functions
 *  Notes:
 *      This file contains code used to debug and test the SVME-770 RTGS.
 *      This code is provided as an example of how to call the RTGS functions
 *      from a host application.
 *  History		:
 *      Created 94/01/17 by Jeff Sanderson
 *
 *END FILE HEADER*********************************************************/

#include "dy4std.h"
#include "es.h"
#include "css.h"

#include "rtgs_ai.h"
#include "video.h"
#include "colours.h"

#include "test.h"


void test_clipping( void );
/*-----------------------------------------------------------------------*/

void test_clipping( void )
{
    init( "Clipping test" );

    Set_foreground_colour( RED );
    Draw_filled_rectangle( 0, 0, 80, 80);
    Draw_filled_rectangle( 80, 80, 160, 160);

    Printf("Calling set clip rectangle 20, 20, 100, 100\n");
    Printf(" clip mode on \n");
    Printf("There should be 2 red rects with 2 green rects overlaid\n");
    Set_clipping_mode( ON );
    Set_clip_rectangle( 20, 20, 100, 100 );
    Set_foreground_colour( GREEN );
    Draw_filled_rectangle( 0, 0, 80, 80);
    Draw_filled_rectangle( 80, 80, 160, 160);
    Key_wait();

    Printf("Calling set clip rectangle 20, 20, 100, 100\n");
    Printf(" clip mode off \n");
    Printf("There should be 2 blue rects\n");
    Set_clipping_mode( OFF );
    Set_foreground_colour( BLUE );
    Draw_filled_rectangle( 0, 0, 80, 80);
    Draw_filled_rectangle( 80, 80, 160, 160);
    Key_wait();
}

/*-----------------------------------------------------------------------*/
