⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rndr_gu2.c

📁 WinCE 3.0 BSP, 包含Inter SA1110, Intel_815E, Advantech_PCM9574 等
💻 C
📖 第 1 页 / 共 2 页
字号:
/*---------------------------------------------------------------------------
 * RNDR_GU2.C
 *
 * Version 2.0 - February 21, 2000
 *
 * This file contains routines to program the 2D acceleration hardware for
 * the second generation graphics unit (???).
 * 
 *    gfx_set_bpp          
 *    gfx_set_blt_buffers   
 *    gfx_set_solid_pattern  
 *    gfx_set_mono_pattern
 *    gfx_set_solid_source  
 *    gfx_set_mono_source
 *    gfx_set_raster_operation
 *    gfx_pattern_fill
 *    gfx_screen_to_screen_blt
 *    gfx_screen_to_screen_xblt
 *    gfx_color_bitmap_to_screen_blt
 *    gfx_color_bitmap_to_screen_xblt
 *    gfx_mono_bitmap_to_screen_blt
 *    gfx_bresenham_line 
 *    gfx_wait_until_idle   
 *
 * History:
 *    Not started.
 *
 * Copyright (c) 1999-2000 National Semiconductor.
 *---------------------------------------------------------------------------
 */
           
/*---------------------------------------------------------------------------
 * GFX_SET_BPP
 *
 * This routine sets the bits per pixel value in the graphics engine.
 * It is also stored in a static variable to use in the future calls to 
 * the rendering routines.
 *---------------------------------------------------------------------------
 */
#if GFX_2DACCEL_DYNAMIC
void gu2_set_bpp(unsigned short bpp)
#else
void gfx_set_bpp(unsigned short bpp)
#endif
{
    GFXbpp = bpp;
}

/*
//---------------------------------------------------------------------------
// GFX_SET_SOLID_SOURCE
//
// This routine is used to specify a solid source color.  For the Xfree96
// display driver, the source color is used to specify a planemask and the 
// ROP is adjusted accordingly.
//---------------------------------------------------------------------------
*/
#if GFX_2DACCEL_DYNAMIC
void gu2_set_solid_source(unsigned long color)
#else
void gfx_set_solid_source(unsigned long color)
#endif
{
    /* CLEAR TRANSPARENCY FLAG */

    GFXsourceFlags = 0;

    /* ### ADD ### IMPLEMENTATION */
}

/*
//---------------------------------------------------------------------------
// GFX_SET_MONO_SOURCE
//
// This routine is used to specify the monochrome source colors.  
// It must be called *after* loading any pattern data (those routines 
// clear the source flags).
//---------------------------------------------------------------------------
*/
#if GFX_2DACCEL_DYNAMIC
void gu2_set_mono_source(unsigned long bgcolor, unsigned long fgcolor,
    unsigned short transparent)
#else
void gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor,
    unsigned short transparent)
#endif
{
    /* SET TRANSPARENCY FLAG */

    GFXsourceFlags = transparent ? 1 : 0;

    /* ### ADD ### IMPLEMENTATION */
}

/*
//---------------------------------------------------------------------------
// GFX_SET_SOLID_PATTERN
//
// This routine is used to specify a solid pattern color.  It is called 
// before performing solid rectangle fills or more complicated BLTs that 
// use a solid pattern color. 
//
// The driver should always call "gfx_load_raster_operation" after a call 
// to this routine to make sure that the pattern flags are set appropriately.
//---------------------------------------------------------------------------
*/
#if GFX_2DACCEL_DYNAMIC
void gu2_set_solid_pattern(unsigned long color)
#else
void gfx_set_solid_pattern(unsigned long color)
#endif
{
    /* CLEAR TRANSPARENCY FLAG */

    GFXsourceFlags = 0;

    /* SET PATTERN FLAGS */

    GFXpatternFlags = 0;

    /* ### ADD ### IMPLEMENTATION */
}

/*
//---------------------------------------------------------------------------
// GFX_SET_MONO_PATTERN
//
// This routine is used to specify a monochrome pattern. 
//---------------------------------------------------------------------------
*/
#if GFX_2DACCEL_DYNAMIC
void gu2_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, 
    unsigned long data0, unsigned long data1, unsigned char transparent)
#else
void gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, 
    unsigned long data0, unsigned long data1, unsigned char transparent)
#endif
{
    /* CLEAR TRANSPARENCY FLAG */

    GFXsourceFlags = 0;

    /* SET PATTERN FLAGS */

    /* ### ADD ### IMPLEMENTATION */
}

/*
//---------------------------------------------------------------------------
// GFX_SET_RASTER_OPERATION
//
// This routine loads the specified raster operation.  It sets the pattern
// flags appropriately.
//---------------------------------------------------------------------------
*/
#if GFX_2DACCEL_DYNAMIC
void gu2_set_raster_operation(unsigned char rop)
#else
void gfx_set_raster_operation(unsigned char rop)
#endif
{
    /* SAVE ROP FOR LATER COMPARISONS */

    GFXsavedRop = rop;
    
    /* SET FLAG INDICATING ROP REQUIRES DESTINATION DATA */
    /* True if even bits (0:2:4:6) do not equal the correspinding */
    /* even bits (1:3:5:7). */

    GFXusesDstData = ((rop & 0x55) ^ ((rop >> 1) & 0x55));

    /* ### ADD ### IMPLEMENTATION */
}

/*
//----------------------------------------------------------------------------
// GFX_PATTERN_FILL
//
// This routine is used to fill a rectangular region.  The pattern must 
// be previously loaded using one of GFX_load_*_pattern routines.  Also, the 
// raster operation must be previously specified using the 
// "GFX_load_raster_operation" routine.
//
//      X               screen X position (left)
//      Y               screen Y position (top)
//      WIDTH           width of rectangle, in pixels
//      HEIGHT          height of rectangle, in scanlines
//----------------------------------------------------------------------------
*/
#if GFX_2DACCEL_DYNAMIC
void gu2_pattern_fill(unsigned short x, unsigned short y, 
    unsigned short width, unsigned short height)
#else
void gfx_pattern_fill(unsigned short x, unsigned short y, 
    unsigned short width, unsigned short height)
#endif
{
    /* ### ADD ### IMPLEMENTATION */
}    

/*
//----------------------------------------------------------------------------
// SCREEN TO SCREEN BLT
//
// This routine should be used to perform a screen to screen BLT when the 
// ROP does not require destination data.
//
//      SRCX            screen X position to copy from
//      SRCY            screen Y position to copy from
//      DSTX            screen X position to copy to
//      DSTY            screen Y position to copy to
//      WIDTH           width of rectangle, in pixels
//      HEIGHT          height of rectangle, in scanlines
//----------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -