This repository has been archived on 2025-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
android-g900/Start_WM/test6/inc/GFGx.h
2010-10-16 00:02:07 +06:00

1928 lines
78 KiB
C
Executable File
Raw Permalink Blame History

/*
* Copyright (c) 2005 - 2006 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property
* and proprietary rights in and to this software and related documentation
* and any modifications thereto. Any use, reproduction, disclosure or
* distribution of this software and related documentation without an express
* license agreement from NVIDIA Corporation is strictly prohibited.
*/
/** @file GFGx.h
GFSDK Graphics API header file.
*/
#ifndef __GFGx_H__
#define __GFGx_H__
#include "GFRm.h"
/* GFGxAPI error codes */
#include "GFGxError.h"
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
/** @addtogroup groupGx GxAPI Graphics API
*/
/* <ul>
<li> @ref pageGxAppNotes
<ul>
<li> @ref pageGxAppNotes1
</ul>
</ul>
*/
/*@{*/
/**** GX CAPABILITIES DEFINITIONS ****/
/** GFGxAPI capability definition : bitblt support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_BLT 0x00000001UL // BitBlt
/** GFGxAPI capability definition : linedraw support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_LINE 0x00000002UL // Line draw
/** GFGxAPI capability definition : clipping support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_CLIP 0x00000004UL // Clipping
/** GFGxAPI capability definition : stretchblt support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_STRETCHBLT 0x00000008UL // StretchBlt
/** GFGxAPI capability definition : alphablending support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHABLENDING 0x00000010UL // Alpha blending
/** GFGxAPI capability definition : alphablending and transparency support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_COLOR_CMP 0x00000020UL // Alpha blending
/* NEW CAPABILITY FLAGS */
/** GFGxAPI capability definition : fast rotation support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_FAST_ROTATION 0x00000040UL // Fast Rotation
/** GFGxAPI capability definition : inside clipping support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_CLIPPING_INSIDE 0x00000100UL // Inside Clipping
/** GFGxAPI capability definition : fadeblt support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_FADE_BLT 0x00000200UL // Fade Blt
/** GFGxAPI capability definition : color pattern support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_COLOR_PATTERN 0x00001000UL // Color Pattern
/** GFGxAPI capability definition : color pattern transparency support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_CLR_PAT_TRANSPARENT 0x00002000UL // Color Pattern Transparency
/** GFGxAPI capability definition : alphablending and fading support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_AND_FADING 0x00004000UL // ALpha Blending & fading
/** GFGxAPI capability definition : 1BPP alpha plane support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_PLANAR_1BPP 0x00008000UL // Planar 1 BPP Alpha
/** GFGxAPI capability definition : 2BPP alpha plane support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_PLANAR_2BPP 0x00010000UL // Planar 2 BPP Alpha
/** GFGxAPI capability definition : 4BPP alpha plane support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_PLANAR_4BPP 0x00020000UL // Planar 4 BPP Alpha
/** GFGxAPI capability definition : 8BPP alpha plane support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_PLANAR_8BPP 0x00040000UL // Planar 8 BPP Alpha
/** GFGxAPI capability definition : SRC4DST4BPP alpha plane support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_PLANAR_SRC4DST4 0x00080000UL // Planar 44 BPP Alpha
// 8 bpp plane, src * 4 + dst*4
/** GFGxAPI capability definition : 32BPP to 16BPP alphablending support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_PLANAR_32BLEND16 0x00200000UL // 32 bits source blending
/** GFGxAPI capability definition : src 1555 alphablending support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_SRC1555 0x00400000UL // Src alpha 1555
/** GFGxAPI capability definition : src 4444 alphablending support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_SRC4444 0x00800000UL // Src alpha 4444
/** GFGxAPI capability definition : src fixed alphablending support.
@see GFGxGetProperty()
*/
#define GFGX_CAP_ALPHA_FIXED 0x01000000UL // Fixed alpha
/**** CLIPPING FLAGS ****/
/* disable clipping */
/** GFGxAPI CLIPPING flags : disable clipping.
@see GFGxSetClip()
*/
#define GFGX_SETCLIP_DISABLE 0x00000000UL
/* enable clipping */
/** GFGxAPI CLIPPING flags : enable clipping.
@see GFGxSetClip()
*/
#define GFGX_SETCLIP_ENABLE 0x00000001UL
/* set clipping rectangle */
/** GFGxAPI CLIPPING flags : set clipping rectangle.
@see GFGxSetClip()
*/
#define GFGX_SETCLIP_SETRECT 0x00000002UL
/* set inside clipping - default is outside clipping*/
/** GFGxAPI CLIPPING flags : set inside clipping, default is outside.
@see GFGxSetClip()
*/
#define GFGX_SETCLIP_INSIDE 0x00000004UL
/**** LINE DRAW FLAGS ****/
/* don't draw last pixel */
/** GFGxAPI LINE DRAW flags : do not draw last pixel.
@see GFGxLine()
*/
#define GFGX_LINE_NOT_DRAW_LAST_PIXEL 0x00000001UL
/**** BITBLT - SOURCE FLAGS ****/
/* source is screen */
/** GFGxAPI BITBLT Source flags : source comes from video mem.
@see GFGxBlt()
*/
#define GFGX_BLT_SRC_VIDEO 0x00000000UL
/* color source in system memory */
/** GFGxAPI BITBLT Source flags : colour source comes from system mem.
@see GFGxBlt()
*/
#define GFGX_BLT_SRC_SYSMEM_COLOR 0x00000001UL
/* mono source in system memory */
/** GFGxAPI BITBLT Source flags : mono source comes from system mem.
@see GFGxBlt()
*/
#define GFGX_BLT_SRC_SYSMEM_MONO 0x00000002UL
/* source is solid color */
/** GFGxAPI BITBLT Source flags : source is solid (unique color).
@see GFGxBlt()
*/
#define GFGX_BLT_SRC_SOLID 0x00000004UL
/**** BITBLT - PATTERN FLAGS ****/
/* pattern is mono */
/** GFGxAPI BITBLT Pattern flags : pattern is mono.
@see GFGxBlt()
*/
#define GFGX_BLT_PAT_MONO 0x00000008UL
/* pattern is color */
/** GFGxAPI BITBLT Pattern flags : pattern is color.
@see GFGxBlt()
*/
#define GFGX_BLT_PAT_COLOR 0x00000010UL
/* pattern is solid color */
/** GFGxAPI BITBLT Pattern flags : pattern is solid (unique color).
@see GFGxBlt()
*/
#define GFGX_BLT_PAT_SOLID 0x00000020UL
/* pattern is cached */
/** GFGxAPI BITBLT Pattern flags : pattern is cached in video mem.
The pattern ID for the cached pattern is returned in the pPatID
field in GFGXBLTPARAM sruct. User needs to make sure that a valid
pointer is passed in pPatID.
@see GFGxBlt()
*/
#define GFGX_BLT_PAT_CACHE 0x00000040UL
/**** BITBLT - MODE FLAGS ****/
/**** Linear / XY Mode / Surface Flag ****/
/* XY Mode Blt */
/** GFGxAPI BITBLT Mode flags : X/Y mode is used.
@see GFGxBlt()
*/
#define GFGX_BLT_MODE_XY 0x00000000UL
/* Linear Mode Blt */
/** GFGxAPI BITBLT Mode flags : linear mode is used.
@see GFGxBlt()
*/
#define GFGX_BLT_MODE_LINEAR 0x00000080UL
/* Surface to Surface blt */
/** GFGxAPI BITBLT Mode flags : surface to surface mode is used.
@see GFGxBlt()
*/
#define GFGX_BLT_SURFACE 0x00000100UL
/**** BITBLT - CLIPPING FLAGS ****/
/* enable clipping */
/** GFGxAPI BITBLT Clipping flags : enable clipping.
@see GFGxBlt()
*/
#define GFGX_BLT_CLIP 0x00000200UL
/**** BITBLT - SOURCE TRANSPARENCY FLAGS ****/
/* color source transparent blt (if source pixel matches colorCompare,
do not overwrite) */
/** GFGxAPI BITBLT Source Transparency flags : enable color source transparency
(if source pixel matches colorCompare, do not overwrite).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_SRC_COLOR 0x00000400UL
/* color source inverse transparent blt (if source pixel matches
colorCompare, overwrite) */
/** GFGxAPI BITBLT Source Transparency flags : enable color source inverse
transparency (if source pixel matches colorCompare, overwrite).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_SRC_COLOR_INV 0x08000000UL
/* mono source transparent blt (if source bit is 0, no
overwrite on corresponding destination location) */
/** GFGxAPI BITBLT Source Transparency flags : enable mono source transparency
(if source bit is 0, no overwrite on corresponding destination location).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_SRC_MONO 0x00000800UL
/* mono source inverted transparent blt (if source bit
is 1, no overwrite on corresponding destination location) */
/** GFGxAPI BITBLT Source Transparency flags : enable mono source inverse
transparency (if source bit is 1, no overwrite on corresponding destination
location).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_SRC_MONO_INV 0x00001000UL
/**** BITBLT - DESTINATION TRANSPARENCY FLAGS ****/
/* destination transparent blt (if destination pixel matches colorCompare,
overwrite) */
/** GFGxAPI BITBLT Destination Transparency flags : enable destination
transparency (if destination pixel matches colorCompare, overwrite).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_DST 0x00002000UL
/* destination transparent inverse blt (if destination pixel matches
colorCompare, donot overwrite) */
/** GFGxAPI BITBLT Destination Transparency flags : enable destination inverse
transparency (if destination pixel matches colorCompare, do not overwrite).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_DST_INV 0x10000000UL
/**** BITBLT - PATTERN TRANSPARENCY FLAGS ****/
/* Mono pattern transparent Blt */
/** GFGxAPI BITBLT Pattern Transparency flags : enable mono pattern transparency
(if pattern bit is 0, no overwrite on corresponding destination location).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_PAT_MONO 0x00004000UL
/* Mono pattern inverted transparent Blt */
/** GFGxAPI BITBLT Pattern Transparency flags : enable mono pattern inverse
transparency (if pattern bit is 1, no overwrite on corresponding destination
location).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_PAT_MONO_INV 0x00008000UL
/* Color pattern transparency Blt */
/** GFGxAPI BITBLT Pattern Transparency flags : enable color pattern transparency
(if pattern pixel matches colorCompare, do not overwrite).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_PAT_COLOR 0x00010000UL
/* Color pattern transparency Blt */
/** GFGxAPI BITBLT Pattern Transparency flags : enable color pattern inverse
transparency (if pattern pixel matches colorCompare, overwrite).
@see GFGxBlt()
*/
#define GFGX_BLT_TRANSPARENT_PAT_COLOR_INV 0x20000000UL
/**** Fade Blt ****/
/** GFGxAPI BITBLT flags : enable fade blt.
@see GFGxBlt()
*/
#define GFGX_BLT_FADE_BLT 0x00020000UL
/* Enable alpha blending */
/** GFGxAPI BITBLT flags : enable alphablending.
@see GFGxBlt()
*/
#define GFGX_BLT_ALPHA_BLENDING 0x00080000UL
/**** ALPHABLENDING FLAGS ****/
/* Fixed alpha operation */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is fixed value.
@see GFGxBlt()
*/
#define GFGX_BLT_ALPHA_FIXED ( 0x00200000UL)
/* Inverse Fixed alpha */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse fixed value.
@see GFGxBlt()
*/
#define GFGX_BLT_ALPHA_FIXED_INV (0x00400000UL)
/* Source alpha ARGB1555 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is source ARGB1555.
@see GFGxBlt()
*/
#define GFGX_BLT_ALPHA_SRC_1555_T (0x00800000UL)
/* Inverse Source alpha ARGB1555 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse source ARGB1555.
@see GFGxBlt()
*/
#define GFGX_BLT_ALPHA_SRC_1555_T_INV (0x01000000UL)
/* Source alpha ARGB4444 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is source ARGB4444.
@see GFGxBlt()
*/
#define GFGX_BLT_ALPHA_SRC_4444 (0x02000000UL)
/* Inverse Source ARGB4444 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse source ARGB4444.
@see GFGxBlt()
*/
#define GFGX_BLT_ALPHA_SRC_4444_INV (0x04000000UL)
/* new flags */
/** GFGxAPI BITBLT Alphablending mask.
@see GFGxBlt()
*/
#define GFGXEX1_MASK 0x3FFFFFFF
/* Fixed alpha operation */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is fixed value.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_FIXED (0x40000000 | 0x00000001UL)
/* Inverse Fixed alpha */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse fixed value.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_FIXED_INV (0x40000000 | 0x00000002UL)
/* Source alpha ARGB1555 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is source ARGB1555.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_SRC_1555_T (0x40000000 | 0x00000004UL)
/* Inverse Source alpha ARGB1555 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse source ARGB1555.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_SRC_1555_T_INV (0x40000000 | 0x00000008UL)
/* Source alpha ARGB4444 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is source ARGB4444.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_SRC_4444 (0x40000000 | 0x00000010UL)
/* Inverse Source ARGB4444 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse source ARGB4444.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_SRC_4444_INV (0x40000000 | 0x00000020UL)
/* Source alpha ARGB8888 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is source ARGB8888.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_SRC_8888 (0x40000000 | 0x00000040UL)
/* Inverse source alpha ARGB8888 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse source ARGB8888.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_SRC_8888_INV (0x40000000 | 0x00000080UL)
/* Destination alpha ARGB8888 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is destination ARGB8888.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_DST_8888 (0x40000000 | 0x00000100UL)
/* Inverse Destination alpha 8888 */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse destination ARGB8888.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_ALPHA_DST_8888_INV (0x40000000 | 0x00000200UL)
/* Planar 1BPP alpha blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is 1BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_1BPP (0x40000000 | 0x00000400UL )
/* Planar 1BPP Inv alpha blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse 1BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_1BPP_INV (0x40000000 | 0x00000800UL)
/* Planar 2BPP alpha blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is 2BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_2BPP (0x40000000 | 0x00001000UL)
/* Planar 2BPP Inv alpha blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse 2BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_2BPP_INV (0x40000000 | 0x00002000UL)
/* Planar 4BPP alpha Blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is 4BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_4BPP (0x40000000 | 0x00004000UL)
/* Planar 4BPP Inv alpha Blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse 4BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_4BPP_INV (0x40000000 | 0x00008000UL)
/* Planar 8BPP alpha Blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is 8BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_8BPP (0x40000000 | 0x00010000UL)
/* Planar 8Bpp Inv alpha Blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse 8BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_8BPP_INV (0x40000000 | 0x00020000UL)
/* Planar 44BPP alpha blending */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is SRC4DST4BPP planar.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_44BPP (0x40000000 | 0x00040000UL)
/* Planar 32 bpp src blending 16 bpp dst */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is 32BPP src to 16BPP dst.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_32BPP16 (0x40000000 | 0x00080000UL)
/*Planar Inv 32 bpp src blending 16 bpp dst */
/** GFGxAPI BITBLT Alphablending flags : alpha mode is inverse 32BPP src to
16BPP dst.
@see GFGxBlt()
*/
#define GFGXEX1_BLT_PLANAR_32BPP16_INV (0x40000000 | 0x00100000UL)
/* Alpha planar is already in video mem, no need to transfer it from sys mem */
#define GFGXEX1_BLT_PLANAR_NOTRANSFER (0x40000000 | 0x00200000UL)
/**** FAST ROTATION FLAGS ****/
/** GFGxAPI BITBLT Fast Rotation mask.
@see GFGxFastRotate()
*/
#define GFGXEX2_MASK 0x3FFFFFFF
/* Fast Rotation Modes */
/* Square (in place rotation) */
/** GFGxAPI BITBLT Fast Rotation flags : dst is same than src.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_SQUARE (0x80000000 | 0x00000001UL)
/* Source to Destination Rotation ( 2 buffers) */
/** GFGxAPI BITBLT Fast Rotation flags : dst is different than src.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_SRC_DST_COPY (0x80000000 | 0x00000002UL)
/* Disable Fast Rotation */
/** GFGxAPI BITBLT Fast Rotation flags : disable fast rotation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_DISABLE (0x80000000 | 0x00000004UL)
/* Fast Rotation Types */
/* Flip-X */
/** GFGxAPI BITBLT Fast Rotation flags : FLIP-X transformation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_FLIP_X (0x80000000 | 0x00000008UL)
/* Flip-Y */
/** GFGxAPI BITBLT Fast Rotation flags : FLIP-Y transformation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_FLIP_Y (0x80000000 | 0x00000010UL)
/* Trans-LR */
/** GFGxAPI BITBLT Fast Rotation flags : TRANSPOSE LEFT-RIGHT transformation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_TRANS_LR (0x80000000 | 0x00000020UL)
/* Trans-RL */
/** GFGxAPI BITBLT Fast Rotation flags : TRANSPOSE RIGHT-LEFT transformation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_TRANS_RL (0x80000000 | 0x00000040UL)
/* 90 deg Rotation */
/** GFGxAPI BITBLT Fast Rotation flags : 90<39> rotation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_ROT_90 (0x80000000 | 0x00000080UL)
/* 180 deg Rotation */
/** GFGxAPI BITBLT Fast Rotation flags : 180<38> rotation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_ROT_180 (0x80000000 | 0x00000100UL)
/* 270 deg Rotation */
/** GFGxAPI BITBLT Fast Rotation flags : 270<37> rotation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_ROT_270 (0x80000000 | 0x00000200UL)
/* Identity */
/** GFGxAPI BITBLT Fast Rotation flags : identity transformation.
@see GFGxFastRotate()
*/
#define GFGXEX2_FAST_ROTATE_IDENTITY (0x80000000 | 0x00000400UL)
/** GFGXAPI STRETCHBLT flag in GFGXBLTPARAM struct
This flag waits for the StretchBlt engine to be idle.
If enabled it will block the CPU thread until the StretchBlt is done.
It is effective only for GFGxStretchBlt().
For other api's it is ignored.
@see GFGxBlt()
*/
#define GFGX_STRETCHBLT_WAITFOR_FINISH 0x00100000UL
/*
* Definition of attribute ids for Set/GetAttributes()
*/
/** GFGxAPI attributes definition.
@see GFGxGetAttribute(), GFGxSetAttribute()
*/
typedef enum _GFGXATTRIBUTES
{
/** Current bits per pixel. */
GFGX_ATTR_BPP,
/** Frame buffer line width in bytes. */
GFGX_ATTR_STRIDE,
/** Ptr to start address of the display frame buffer. */
GFGX_ATTR_ADDR_PTR,
/** Start address offset. */
GFGX_ATTR_ADDR,
/** Surface for GFGxAPI operations. */
GFGX_ATTR_SURFACE,
/** Palette RGB888. */
GFGX_ATTR_PALETTE_RGB888
} GFGXATTRIBUTES;
/* Blt parameter struct */
/** GFGxAPI BLT parameter structure.
@see GFGxBlt()
*/
typedef struct _GFGXBLTPARAM
{
/** Destination x in pixels (relative to left). */
NvS16 dx;
/** Destination y in scan lines (relative to top). */
NvS16 dy;
/** Width of the source rectangle in pixels. */
NvS16 w;
/** Height of the source rectangle in pixels. */
NvS16 h;
/** Source x in pixels (relative to left). */
NvS16 sx;
/** Source y in scan lines (relative to top). */
NvS16 sy;
/** Width of the source rectangle in pixels (for Stretch Blt only). */
NvS16 sw;
/** Height of the source rectangle in scan lines (for Stretch Blt only). */
NvS16 sh;
/** Color depth */
NvU16 bpp;
/** Number of bytes per scanline for bitmap. */
NvS16 stride;
/** Foreground color (used if pixel data is 1 on 1BPP source bitmap). */
NvU32 fgColor;
/** Background color (used if pixel data is 0 on 1BPP source bitmap). */
NvU32 bgColor;
/** Pointer to source bitmap. */
NvU8 *pBits;
/** Pattern offset in x direction. */
NvS16 px;
/** Pattern offset in y direction. */
NvS16 py;
/** Pattern foreground color (used if pixel data is 1 on 1BPP pattern bitmap).*/
NvU32 patFgColor;
/** Pattern background color (used if pixel data is 0 on 1BPP pattern bitmap).*/
NvU32 patBgColor;
/** Pattern color key for transparent blt.*/
NvU32 patColorCmp;
/** Pointer to pattern bitmap. */
NvU8 *pPatBits;
/** Number of bytes per scanline for pattern. */
NvU32 patStride;
/** Width of pattern. */
NvU32 patW;
/** Height of pattern. */
NvU32 patH;
/** pointer to Pattern ID when GFGX_BLT_PAT_CACHE flag is set. */
/** GFGxBlt() will return the patID in this field */
NvU32 *pPatID;
// Miscellaneous parameters
/** Color key for transparent blt. */
NvU32 colorCompare;
/** Main flags setting. */
NvU32 flags;
/** Raster operation code (ROP3). */
NvU16 rop3;
// Surface parameters
/** Pointer to dst surface pointer. */
PGFRMSURFACE *ppDestSurf;
/** Pointer to src surface pointer. */
PGFRMSURFACE *ppSrcSurf;
/** Source start address. */
NvU32 srcStartAddr;
/** Destination start address. */
NvU32 dstStartAddr;
/** Number of bytes per scanline for destination. */
NvS16 dstStride;
// alpha blending parameters
/** Alpha value for GFGX_BLT_ALPHA_FIXED or alphaFg for GFGX_BLT_ALPHA_SRC_1555_T. */
NvU16 alpha;
/** Background alpha for GFGX_BLT_ALPHA_SRC_1555_T. */
NvU16 alphaBg;
/** Pointer to alpha plane. */
NvU8 *pAlphaplane;
// Fading parameters
/** Fading coefficient. */
NvU32 fadeCoeff;
/** Fading offset. */
NvU32 fadeOffset;
/** Alphablending flag. */
NvU32 flagex1;
/** Fast rotation flag. */
NvU32 flagex2;
} GFGXBLTPARAM;
/** @name Functions
@{*/
/** This function returns version and capabilities of API and hardware.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pGxProp (PGFPROPERTY) Pointer to property structure to be filled in
@retval #GF_SUCCESS pGxProp filled in successfully
@retval #GF_ERROR Some error occured
The #GFPROPERTY structure passed with parameter pGxProp will be
filled in on successfull return.
The GFPROPERTY::Capability field will hold a combination of flagbits
indicating capabilities specific to the GFGxAPI :
<table>
<tr><td>#GFGX_CAP_BLT </td>
<td>BitBlt supported.</td></tr>
<tr><td>#GFGX_CAP_LINE </td>
<td>Line Draw supported.</td></tr>
<tr><td>#GFGX_CAP_CLIP </td>
<td>Clipping supported.</td></tr>
<tr><td>#GFGX_CAP_STRETCHBLT</td>
<td>Stretchblt supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHABLENDING </td>
<td>Alphablending supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_COLOR_CMP</td>
<td>Alphablending and transparency supported.</td></tr>
<tr><td>#GFGX_CAP_FAST_ROTATION </td>
<td>Fast rotation supported.</td></tr>
<tr><td>#GFGX_CAP_CLIPPING_INSIDE </td>
<td>Inside clipping supported.</td></tr>
<tr><td>#GFGX_CAP_FADE_BLT </td>
<td>Fadeblt supported.</td></tr>
<tr><td>#GFGX_CAP_COLOR_PATTERN </td>
<td>Color pattern supported.</td></tr>
<tr><td>#GFGX_CAP_CLR_PAT_TRANSPARENT</td>
<td>Color pattern transparency supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_AND_FADING </td>
<td>Alphablending and fading supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_PLANAR_1BPP </td>
<td>1BPP alpha planar supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_PLANAR_2BPP </td>
<td>2BPP alpha plane supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_PLANAR_4BPP </td>
<td>4BPP alpha plane supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_PLANAR_8BPP </td>
<td>8BPP alpha plane supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_PLANAR_SRC4DST4</td>
<td>SRC4DST4BPP alpha plane supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_PLANAR_32BLEND16 </td>
<td>32BPP to 16BPP alphablending supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_SRC1555</td>
<td>Src 1555 alphablending supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_SRC4444 </td>
<td>Src 4444 alphablending supported.</td></tr>
<tr><td>#GFGX_CAP_ALPHA_FIXED </td>
<td>Src fixed alphablending supported.</td></tr>
</table>
It is recommended, but not mandatory, that you call this function to query
for the GFGxAPI version and capabilities before proceeding to call any of
the other GFGxAPI functions.
@see GFPROPERTY
*/
GF_RETTYPE GFGxGetProperty(GFGxHandle GxHandle,
PGFPROPERTY pGxProp);
/** This function fills a rectangle in video memory with the specified solid color.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param x,y (NvS16) left-top corner of the rectangle (x in pixels, y in scan lines)
@param w,h (NvS16) width & height of the rectangle (w in pixels, h in scan lines)
@param color (NvU32) color to be filled (8BPP index, or 16BPP-32BPP TrueColor)
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxFillRectEx()
*/
GF_RETTYPE GFGxFillRect(GFGxHandle GxHandle,
NvS16 x, NvS16 y,
NvS16 w, NvS16 h,
NvU32 color);
/** This function is commonly used in scrolling an image in video memory. It copies
a rectangular image in the video memory to another location in the same video
memory.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle (dx in pixels, dy in scan lines)
@param w,h (NvS16) width & height of rectangles (w in pixels, h in scan lines)
@param sx,sy (NvS16) left-top corner of source rectangle (sx in pixels, sy in scan lines)
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
GFGxCopyRect() checks for the destruction of the copied image in video memory
caused by overlapping source and destination locations.
Also, if the destination for the rectangle exceeds the limit of the video memory,
wrapping is done in hardware and no error code is returned.
@see GFGxCopyRectEx(), GFGxCopyRectDirect()
*/
GF_RETTYPE GFGxCopyRect(GFGxHandle GxHandle,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy);
/** This function copies a source bitmap from system memory to the video memory.
The source bitmap is specified in monochrome (1BPP) pixels.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle (dx in pixels, dy in scan lines)
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle (sx in pixels, sy in scan lines)
@param fgColor (NvU16) color applied to source data bit 1 (The color depth should be same as the frame buffer)
@param bgColor (NvU16) color applied to source data bit 0 (The color depth should be same as the frame buffer)
@param srcStride (NvS16) source stride in bytes
@param pMonoBits (NvU8*) pointer to monochome (1bpp) bitmap
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyTransMonoBitmap()
*/
GF_RETTYPE GFGxCopyMonoBitmap( GFGxHandle GxHandle,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy,
NvU32 fgColor, NvU32 bgColor,
NvS16 srcStride,
NvU8 *pMonoBits);
/** This function copies the bitmap from video memory to system memory.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle (dx in pixels, dy in scan lines)
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle (sx in pixels, sy in scan lines)
@param dstStride (NvS16) destination stride in bytes
@param pDstAddr (NvU8*) pointer to destination buffer
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
*/
GF_RETTYPE GFGxReadBlt( GFGxHandle GxHandle,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy,
NvS16 dstStride,
NvU8 *pDstStartAddr);
/** This function copies a source bitmap from system memory to the video memory.
The source bitmap is specified in monochrome (1BPP) pixels and can be transparent.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param color (NvU16) color applied to non-transparent source data bit
@param srcStride (NvS16) source stride in bytes
@param pMonoBits (NvU8*) pointer to monochome (1bpp) bitmap
@param selectTrans (NvS16) transparency select: 0 or 1
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
This function is similar to GFGxCopyMonoBitmap() except for the selectTrans parameter.
This parameter indicates whether bit data equal to 0 or 1 is going to be transparent.
This function could be used for drawing a transparent text string or character.
@see GFGxCopyMonoBitmap()
*/
GF_RETTYPE GFGxCopyTransMonoBitmap( GFGxHandle GxHandle,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy,
NvU32 color,
NvS16 srcStride,
NvU8 *pMonoBits,
NvS16 selectTrans );
/** This function is used to blit/blend a given source rectangle to/with the given
destination location in the video memory.
Overlap rectangles are handled properly. Source and destination rectangles must
have same size.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pBltParam (#GFGXBLTPARAM*) refer to structure definition
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
This routine is more generic. It supports System Memory to Video Memory Blts and
Video to Video Memory Blts involving Source and Pattern data.The Source and Pattern
data can be either Color or Monochrome(1 Bpp). Monochrome Blts are supported by performing
a Monochrome to Color Expansion.
Tiling mode is also supported for Mono Patttern Blts. The size of the pattern in this case
should be 16x16. Tiling is not supported for Color Patterns.
The following features can also be enabled during Blts :
- Color Source and Mono Source Transparency
- Destination Transparency,
- Color Pattern and Mono Pattern Transparency
- Alphablending ( Both Planar and Source Alpha)
- Fading
- Microsoft Windows compatible ROP3
- Clipping
GFGxBlt() supports both raster operations and alpha blending operations.The two types
of operations are mutually exclusive.
Please refer to the supported GFGxBlt() flags starting with GFGX_BLT_* and GFGXEX1_BLT_*.
@see GFGxCopyRect(), GFGxCopyRectDirect(), GFGxBltSurface(), GFGxCopyMonoBitmap(),
GFGxCopyTransMonoBitmap(), GFGxCopyColorBitmap()
*/
GF_RETTYPE GFGxBlt( GFGxHandle GxHandle,
const GFGXBLTPARAM *pBltParam );
/**
This function performs a surface-to-surface blit. The color depth of the source
surface must match that of the destination. Also, the width and height of the
source must be the same as the destination's width and height.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param ppDestSurf (#PGFRMSURFACE*) pointer to destination surface pointer
@param ppSrcSurf (#PGFRMSURFACE) pointer so source surface pointer
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param rop3 (NvU16) raster operation code
@param srcStartAddr (NvU32) start address relative to the source surface
@param dstStartAddr (NvU32) start address relative to the destination surface
@param flags (NvU32) Transparent blit flag. See Below
@param colorCompare (NvU32) color key for transparent blit. If there is no transparent blit, colorCompare = 0
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
Transparent blit flag is one of the following:
- GFGX_BLT_TRANSPARENT_SRC_COLOR
- GFGX_BLT_TRANSPARENT_SRC_MONO
- GFGX_BLT_TRANSPARENT_SRC_MONO_INV
- GFGX_BLT_TRANSPARENT_DST
- GFGX_BLT_TRANSPARENT_PAT_COLOR
- GFGX_BLT_TRANSPARENT_PAT_COLOR_INV
- GFGX_BLT_TRANSPARENT_PAT_MONO
- GFGX_BLT_TRANSPARENT_PAT_MONO_INV
Refer to GFGX_BLT_X flag definitions for further information. If no transparent blit, flag = 0
Alphablending is not supported.
@see GFGxCopyRect(), GFGxCopyRectDirect(), GFGxBltSurface(), GFGxCopyMonoBitmap(),
GFGxCopyTransMonoBitmap(), GFGxCopyColorBitmap()
*/
GF_RETTYPE GFGxBltSurface( GFGxHandle GxHandle, PGFRMSURFACE *ppDestSurf,
PGFRMSURFACE *ppSrcSurf,
NvS16 w, NvS16 h, NvU16 rop3,
NvU32 srcStartAddr, NvU32 dstStartAddr,
NvU32 flags, NvU32 colorCompare);
/** This function copies a source bitmap from system memory to the video memory.
The source bitmap's color depth must match the destination's video memory's color depth.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param srcStride (NvS16) source stride in bytes, must be pixel size aligned
@param pColorBits (NvU8*) pointer to color bitmap
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyMonoBitmap()
*/
GF_RETTYPE GFGxCopyColorBitmap( GFGxHandle GxHandle,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy,
NvS16 srcStride,
NvU8 *pColorBits );
/** This function draws a line from a point x1, y1 to another point x2, y2 with a specified color
and ROP2 code. GFGxSetClip() should be called before calling GFGxLine(). If clipping is needed,
it is assumed that clipping is enabled and clipping rectangle was set by GFGxSetClip(). If
clipping is not set, the line wraps if it is too long, and no error code is returned.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param x1,y1 (NvU16) (x,y) destination point coords (in pixels, scan lines)
@param x2,y2 (NvU16) (x,y) source point coords in (pixels, scan lines)
@param rop2 (NvU16) ROP2 code
@param color (NvU16) color key for transparent blt or pattern color
@param flags (NvU16) refer to GFGX_LINE_X flag definitions
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
Set flags to GFGX_LINE_NOT_DRAW_LAST_PIXEL if the last pixel is not to be
drawn.
*/
GF_RETTYPE GFGxLine( GFGxHandle GxHandle,
NvU16 x1, NvU16 y1, NvU16 x2, NvU16 y2,
NvU16 rop2, NvU32 color, NvU16 flags );
/** This function enables or disables clipping and also sets the clipping rectangle for subsequent
blit and line drawing functions.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pClipRect (#PGFRECT) pointer to the clipping rectangle
@param clipFlag (NvU32) See below
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
Set clipFlag to one of the following:
- GFGX_SETCLIP_DISABLE
- GFGX_SETCLIP_ENABLE
- GFGX_SETCLIP_SETRECT
Refer to GFGX_SETCLIP_X flag definitions
Clipping Sample Code
// Initialize clipping and rectangle parameters.
clipRect.top = 10;
clipRect.left = 10;
clipRect.right = 60;
clipRect.bottom = 60;
// Set the clipping rectangle and enable clipping.
GFGxSetClip( GxHandle, &clipRect, (GFGX_SETCLIP_SETRECT|
GFGX_SETCLIP_ENABLE) );
// Call drawing function: Rectangle Fill, Pattern Fill, etc.
GFGXFillRect( GxHandle, 20, 20, 30, 30, 0x07E0 );
// Disable clipping.
GFGxSetClip( GxHandle, NULL, GFGX_SETCLIP_DISABLE );
*/
GF_RETTYPE GFGxSetClip( GFGxHandle GxHandle,
PGFRECT pClipRect, NvU32 clipFlag);
/** This function ensures synchronization between 2D operations and others modules operations.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param timeout (NvU32) obsolete parameter
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
When several modules share the same channel (like 3D,2D), it may be necessary to
synchronize the command flow with the 2D module execution. Putting a GFGxNotBusy()
call after a 2D operation ensures that commands which follow the 2D command are
executed after full completion of the 2D command.
As opposed to GFGxWaitNotBusy(), this function doesn't block the CPU thread.
Graphics engine may not be idle when returning from the function. Control returns
to the CPU right after a wait command is placed in the graphics engine command FIFO.
The GoForce hardware begins executing the commands following the engine idle
command only after the graphics engine becomes idle.
@see GFGxWaitNotBusy()
*/
GF_RETTYPE GFGxNotBusy( GFGxHandle GxHandle,
NvU32 timeout );
/** This function sets the new value into the palette entry at index location.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param palVal (NvU32) New palette entry value
@param index (NvU16) Index of the palette entry
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
The index value ranges from [0..255] inclusively. Parameter palVal is in RGB format,
where bits [0-7] represent the red value, bits [8-15] the green value, and bits [16-23]
the blue value.
When this function is called, the physical palette entry is modified permanently.
This function is used only for the 8-bits per-pixel mode and does not apply to the RGB 16 and
32-bits mode.
@see GFGxGetPal(), GFGxSetPalRange(), GFGxGetPalRange()
*/
GF_RETTYPE GFGxSetPal(GFGxHandle GxHandle,
NvU32 palVal, NvU16 index);
/** This function sets the a range of new values pointed by pPalRange into the palette entries
starting at startIndex location and ending at endIndex inclusively.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pPalRange (NvU32*) Pointer to a range of palette entry values
@param startIndex (NvU16) Starting index of palette entries
@param endIndex (NvU16) Ending index of palette entries
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
The index value ranges from [0..255] inclusively. Each palette entry value is in RGB format,
where bits [0-7] represent the red value, bits [8-15] the green value, and bits [16-23]
the blue value.
When this function is called, the physical palette entry is modified permanently.
This function is used only for the 8-bits per-pixel mode and does not apply to the RGB 16 and
32-bits mode.
@see GFGxGetPal(), GFGxSetPalRange(), GFGxGetPalRange()
*/
GF_RETTYPE GFGxSetPalRange(GFGxHandle GxHandle,
NvU32 * palRange,
NvU16 startIndex, NvU16 endIndex);
/** This function returns the palette entry value at index location.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pPalVal (NvU32*) pointer to palette entry value
@param index (NvU16) index of the palette entry
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
The index value ranges from [0..255] inclusively. The returned palette entry value is stored
in the location pointed to by pPalVal.
This function is used only for the 8-bits per-pixel mode and does not apply to the RGB 16 and
32-bits mode.
@see GFGxSetPal(), GFGxSetPalRange(), GFGxGetPalRange()
*/
GF_RETTYPE GFGxGetPal(GFGxHandle GxHandle,
NvU32 * pPalVal,
NvU16 index);
/** This function returns the palette entry values starting from location startIndex to endIndex
inclusively.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pPalArray (NvU32*) Pointer to a range of palette entry values
@param startIndex (NvU16) Starting index of palette entries
@param endIndex (NvU16) Ending index of palette entries
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
The index value ranges from [0..255] inclusively. The returned values are stored into
variables pointed to by pPalArray.
This function is used only for the 8-bits per-pixel mode and does not apply to the RGB 16 and
32-bits mode.
@see GFGxSetPal(), GFGxGetPal(), GFGxSetPalRange()
*/
GF_RETTYPE GFGxGetPalRange(GFGxHandle GxHandle,
NvU32 * pPalArray,
NvU16 startIndex, NvU16 endIndex);
/** This function transfers a color bitmap of exact full screen size from system memory to video memory.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pBltParam (#GFGXBLTPARAM*) refere to structure definition
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxBlt()
*/
GF_RETTYPE GFGxBltFullScreen(GFGxHandle GxHandle,
const GFGXBLTPARAM *pBltParam);
/** This function copies a rectangular image in the video memory to another location in the same video
memory without taking care of overlapping cases.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of rectangles
@param sx,sy (NvS16) left-top corner of source rectangle
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
This is a special case of GxCopyRect(). It does not check on destructions of copied image
on video memory due to overlapping source and destination locations.
@see GFGxCopyRectEx(), GFGxCopyRect()
*/
GF_RETTYPE GFGxCopyRectDirect(GFGxHandle GxHandle,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy);
/** This function copies a source bitmap from system memory to the video memory with
certain restrictions.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param bitmapPtr (NvU32*) Pointer to color bitmap
@param size_in_bytes (NvU16) Total bytes to transfer
@param rect (#GFRECT) Destination rectangle
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
This is a special case of GxCopyColorBitmap(). Conditions below must be verified :
- The source bitmap pointer, pColorBits, has to be a 32-bit (DWORD) aligned address.
- The size of each line of the source bitmap must be 64-bits (8 bytes, QWORD) aligned.
- There must not be any skipping bytes between lines.
- Total bitmap size has to be smaller than or equal to 2K (2048) bytes.
- The source bitmap's color depth MUST match the destination video memory's color depth.
@see GxCopyColorBitmap()
*/
GF_RETTYPE GFGxCopyPackedColorBitmap(GFGxHandle GxHandle,
NvU32 *pColorBits,
NvU16 bitmapSize,
GFRECT rect);
/** This function sets a given attribute.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param aid (NvU32) Attribute id, such as width, height etc
@param attr (NvU32) Attribute value
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
Attribute id can be one of the following :
<table>
<tr><td>#GFGX_ATTR_BPP </td>
<td>Current bits per pixel.</td></tr>
<tr><td>#GFGX_ATTR_STRIDE </td>
<td>Frame buffer line width in bytes.</td></tr>
<tr><td>#GFGX_ATTR_ADDR_PTR </td>
<td>Ptr to start address of the display frame buffer.</td></tr>
<tr><td>#GFGX_ATTR_ADDR</td>
<td>Start address offset.</td></tr>
<tr><td>#GFGX_ATTR_SURFACE </td>
<td>Surface for GFGxAPI operations.</td></tr>
<tr><td>#GFGX_ATTR_PALETTE_RGB888 </td>
<td>Palette RGB888.</td></tr>
</table>
@see GFGxGetAttribute()
*/
GF_RETTYPE GFGxSetAttribute(GFGxHandle GxHandle,
NvU32 aid,NvU32 attr);
/** This function gets an attribute. Certain attributes are fixed.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param aid (NvU32) attribute id, such as width, height etc
@param attr (NvU32*) pointer to returned attribute value
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
Attribute id can be one of the following :
<table>
<tr><td>#GFGX_ATTR_BPP </td>
<td>Current bits per pixel.</td></tr>
<tr><td>#GFGX_ATTR_STRIDE </td>
<td>Frame buffer line width in bytes.</td></tr>
<tr><td>#GFGX_ATTR_ADDR_PTR </td>
<td>Ptr to start address of the display frame buffer.</td></tr>
<tr><td>#GFGX_ATTR_ADDR</td>
<td>Start address offset.</td></tr>
<tr><td>#GFGX_ATTR_SURFACE </td>
<td>Surface for GFGxAPI operations.</td></tr>
<tr><td>#GFGX_ATTR_PALETTE_RGB888 </td>
<td>Palette RGB888.</td></tr>
</table>
@see GFGxSetAttribute()
*/
GF_RETTYPE GFGxGetAttribute(GFGxHandle GxHandle,
NvU32 aid, NvU32 *attr);
/** This function checks whether the graphics engine is busy or idle.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param timeout (NvU32) obsolete parameter
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
The function will wait until the graphics engine is idle. For example, if you want
to write to the frame buffer but the graphics engine is busy the function can be used
to wait until it is idle.
As opposed to GFGxNotBusy(), this function blocks the CPU thread while waiting for
the graphics engine to become idle.
@see GFGxNotBusy()
*/
GF_RETTYPE GFGxWaitNotBusy( GFGxHandle GxHandle,
NvU32 timeout );
/** This function is used to stretch or shrink an image, which can be in system memory or video memory.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pBltParam (#GFGXBLTPARAM*) refere to structure definition
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
The function has these limitations :
- supports 16 and 32BPP color depths,
@see GFGxBlt()
*/
GF_RETTYPE GFGxStretchBlt( GFGxHandle GxHandle,
const GFGXBLTPARAM *pBltParam );
/*******************************New API's based on enhancing old API's****************************/
/** This function fills a rectangle in the video memory with the specified solid color.
Video memory location is specified by the surface parameter.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pSurf (#PGFRMSURFACE) pointer to destination surface
@param x,y (NvS16) left-top corner of the rectangle
@param w,h (NvS16) width & height of the rectangle
@param color (NvU32) color to be filled (8BPP index, or 16BPP-32BPP TrueColor)
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxFillRect()
*/
/* Old API's with enhancement */
GF_RETTYPE GFGxFillRectEx(GFGxHandle GxHandle,
PGFRMSURFACE pSurf,
NvS16 x, NvS16 y,
NvS16 w, NvS16 h,
NvU32 color);
/** This function copies a rectangular image in the video memory to another location in the same
video memory. It is commonly used in scrolling an image in video memory.
Video memory location is specified by the surface parameter.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pSurf (#PGFRMSURFACE) pointer to destination surface
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of rectangles
@param sx,sy (NvS16) left-top corner of source rectangle
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
GFGxCopyRectEx() checks for the destruction of the copied image in video memory
caused by overlapping source and destination locations. Also, if the destination
for the rectangle exceeds the limit of the video memory, wrapping is done in hardware
and no error code is returned.
@see GFGxCopyRect(), GFGxCopyRectDirect()
*/
GF_RETTYPE GFGxCopyRectEx(GFGxHandle GxHandle,
PGFRMSURFACE pSurf,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy);
/** This function copies a source bitmap from system memory to the video memory.
The source bitmap is specified in monochrome (1BPP) pixels.
Video memory location is specified by the surface parameter.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pSurf (#PGFRMSURFACE) pointer to destination surface
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param fgColor (NvU16) color applied to source data bit 1
@param bgColor (NvU16) color applied to source data bit 0
@param srcStride (NvS16) source stride in bytes
@param pMonoBits (NvU8*) pointer to monochome (1bpp) bitmap
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyTransMonoBitmap()
*/
GF_RETTYPE GFGxCopyMonoBitmapEx( GFGxHandle GxHandle,
PGFRMSURFACE pSurf,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy,
NvU32 fgColor, NvU32 bgColor,
NvS16 srcStride,
NvU8 *pMonoBits);
/** This function copies a source bitmap from system memory to the video memory.
The source bitmap is specified in monochrome (1BPP) pixels and can be transparent.
Video memory location is specified by the surface parameter.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pSurf (#PGFRMSURFACE) pointer to destination surface
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param color (NvU16) color applied to non-transparent source data bit
@param srcStride (NvS16) source stride in bytes
@param pMonoBits (NvU8*) pointer to monochome (1bpp) bitmap
@param selectTrans (NvS16) transparency select: 0 or 1
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
This function is similar to GFGxCopyMonoBitmapEx() except for the selectTrans
parameter. This parameter indicates whether bit data equal to 0 or 1 is going to be
transparent.
This function could be used for drawing a transparent text string or character.
@see GFGxCopyMonoBitmapEx()
*/
GF_RETTYPE GFGxCopyTransMonoBitmapEx( GFGxHandle GxHandle,
PGFRMSURFACE pSurf,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy,
NvU32 color,
NvS16 srcStride,
NvU8 *pMonoBits,
NvS16 selectTrans);
/** This function copies a source bitmap from system memory to the video memory.
The source bitmap's color depth must match the destination's video memory's color depth.
Video memory location is specified by the surface parameter.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pSurf (#PGFRMSURFACE) pointer to destination surface
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param srcStride (NvS16) source stride in bytes, must be pixel size aligned
@param pColorBits (NvU8*) pointer to color bitmap
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyMonoBitmap()
*/
GF_RETTYPE GFGxCopyColorBitmapEx( GFGxHandle GxHandle,
PGFRMSURFACE pSurf,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy,
NvS16 srcStride,
NvU8 *pColorBits
);
/** This function draws a line from a point x1, y1 to another point x2, y2 with a specified color
and ROP2 code.
Video memory location is specified by the surface parameter.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pSurf (#PGFRMSURFACE) pointer to destination surface
@param x1,y1 (NvU16) (x,y) destination point coords
@param x2,y2 (NvU16) (x,y) source point coords
@param rop2 (NvU16) ROP2 code
@param color (NvU16) color key for transparent blt or pattern color
@param flags (NvU16) refere to GFGX_LINE_X flag definitions
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxLine()
*/
GF_RETTYPE GFGxLineEx( GFGxHandle GxHandle,
PGFRMSURFACE pSurf,
NvU16 x1, NvU16 y1,
NvU16 x2, NvU16 y2,
NvU16 rop2, NvU32 color,
NvU16 flags);
GF_RETTYPE GFGxBltFullScreenEx(GFGxHandle GxHandle,
PGFRMSURFACE pSurf,
const GFGXBLTPARAM *pBltParam);
/** This function copies a rectangular image in the video memory to another location in the same video
memory without taking care of overlapping cases.
Video memory location is specified by the surface parameter.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pSurf (#PGFRMSURFACE) pointer to destination surface
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of rectangles
@param sx,sy (NvS16) left-top corner of source rectangle
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
This is a special case of GxCopyRect(). It does not check on destructions
of copied image on video memory due to overlapping source and destination locations.
@see GFGxCopyRectEx(), GFGxCopyRect(), GFGxCopyRectDirect()
*/
GF_RETTYPE GFGxCopyRectDirectEx(GFGxHandle GxHandle,
PGFRMSURFACE pSurfNvS16,
NvS16 dx, NvS16 dy,
NvS16 w, NvS16 h,
NvS16 sx, NvS16 sy);
/** This function copies a source bitmap from system memory to the video memory with
certain restrictions.
Video memory location is specified by the surface parameter.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pSurf (#PGFRMSURFACE) pointer to destination surface
@param pColorBits (NvU32*) pointer to color bitmap
@param bitmapSize (NvU16) total bytes to transfer
@param rect (#GFRECT) destination rectangle
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
This is a special case of GxCopyColorBitmap(). Conditions below must be verified :
- The source bitmap pointer, pColorBits, has to be a 32-bit (DWORD) aligned address.
- The size of each line of the source bitmap must be 64-bits (8 bytes, QWORD) aligned.
- There must not be any skipping bytes between lines.
- Total bitmap size has to be smaller than or equal to 2K (2048) bytes.
- The source bitmap's color depth MUST match the destination video memory's color depth.
@see GxCopyColorBitmap(), GFGxCopyPackedColorBitmap()
*/
GF_RETTYPE GFGxCopyPackedColorBitmapEx( GFGxHandle GxHandle,
PGFRMSURFACE pSurf,
NvU32 *pColorBits,
NvU16 bitmapSize,
GFRECT rect
/** This function performs a surface-to-surface blit. The color depth of the source
surface must match that of the destination. Also, the width and height of the
source must be the same as the destination's width and height.
Alphablending parameters can be specified.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param ppDestSurf (#PGFRMSURFACE*)pointer to destination surface pointer
@param ppSrcSurf (#PGFRMSURFACE) pointer so source surface pointer
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param rop3 (NvU16) raster operation code
@param srcStartAddr (NvU32) start address relative to the source surface
@param dstStartAddr (NvU32) start address relative to the destination surface
@param flags (NvU32) refer to GFGX_BLT_X flag definitions
@param flagex1 (NvU32) refer to alphablending flag definitions GFGXEX1_BLT_X
@param colorCompare (NvU32) color key for transparent blit
@param alpha (NvU16) alpha value for GFGX_BLT_ALPHA_FIXED or alphaFg
@param alphaBg (NvU16) background alpha
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyRect(), GFGxCopyRectDirect(), GFGxBltSurface(), GFGxCopyMonoBitmap(),
GFGxCopyTransMonoBitmap(), GFGxCopyColorBitmap()
*/ );
GF_RETTYPE GFGxBltSurfaceEx( GFGxHandle GxHandle, PGFRMSURFACE *ppDestSurf,
PGFRMSURFACE *ppSrcSurf,
NvS16 w, NvS16 h, NvU16 rop3,
NvU32 srcStartAddr, NvU32 dstStartAddr,
NvU32 flags, NvU32 flagex1, NvU32 colorCompare,
NvU16 alpha, NvU16 alphaBg);
/* New API's based on new features */
/*******************************New API's based on New Features***********************************/
/** This function is used to transform a given source rectangle to the given destination
location in the video memory.
Rotation takes place in counterclockwise direction.
Destination rectangle can be same than source rectangle or different. <br><br>
Both source and destination must be in video memory.
Common input data requirements :
- the data buffer must be aligned on all edges (top, bottom, left, right), which also implies
that stride is <br> multiple of 16 bytes,
- the base address of both source and destination must be aligned at a 128-bit word aligned,
- in GFGX_BLT_SURFACE mode, source and destination must be same format : GF_SURFACE_RGB8, <br>
GF_SURFACE_RGB565, GF_SURFACE_ARGB8888, or GF_SURFACE_YUV420,
- GFGX_BLT_MODE_LINEAR and X/Y modes are also supported for GF_SURFACE_RGB8, <br> GF_SURFACE_RGB565
and GF_SURFACE_ARGB8888,
- width and height must be multiple of 16 pixels in 8bpp mode, 8 in 16bpp and 4 in 32bpp for <br>
GF_SURFACE_RGB8, GF_SURFACE_RGB565 and GF_SURFACE_ARGB8888 surfaces,
- in GFGXEX2_FAST_ROTATE_SQUARE mode, width should be equal to height for 90, 270, <br>
TRANS_LR and TRANS_RL modes. Also the destination surface should be same as source
surface.
Specific GF_SURFACE_YUV420 input data requirements :
- only GFGX_BLT_SURFACE mode is supported, with no offsets defined for both source and
<br> destination (dstStartAddr = srcStartAddr = 0).
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param pBltParam (#GFGXBLTPARAM*) refere to structure definition
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
This function can be used the same way than GFGxBlt, adding flagex2 information.
The following transformations are supported :
<table>
<tr><td>#GFGXEX2_FAST_ROTATE_FLIP_X </td>
<td>FLIP-X.</td></tr>
<tr><td>#GFGXEX2_FAST_ROTATE_FLIP_Y </td>
<td>FLIP-Y.</td></tr>
<tr><td>#GFGXEX2_FAST_ROTATE_TRANS_LR </td>
<td>TRANSPOSE LEFT-RIGHT.</td></tr>
<tr><td>#GFGXEX2_FAST_ROTATE_TRANS_RL</td>
<td>TRANSPOSE RIGHT-LEFT.</td></tr>
<tr><td>#GFGXEX2_FAST_ROTATE_ROT_90 </td>
<td>90<39> rotation.</td></tr>
<tr><td>#GFGXEX2_FAST_ROTATE_ROT_180</td>
<td>180<38> rotation.</td></tr>
<tr><td>#GFGXEX2_FAST_ROTATE_ROT_270 </td>
<td>270<37> rotation.</td></tr>
</table>
@see GFGxBlt()
*/
GF_RETTYPE GFGxFastRotate(GFGxHandle GxHandle,
const GFGXBLTPARAM *pBltParam);
/** This function copies a source bitmap from system memory to the video memory.
The source bitmap's color depth must match the destination's video memory's color depth.
Source transparency is supported.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param srcStride (NvS16) source stride in bytes, must be pixel size aligned
@param pColorBits (NvU8*) pointer to color bitmap
@param pSrcColorKey (NvU32*) pointer to source color key. If NULL no transparency.
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyMonoBitmap(), GFGxCopyColorBitmap()
*/
GF_RETTYPE GFGxCopyTransColorBitmap(GFGxHandle GxHandle,
NvS16 dx,
NvS16 dy,
NvS16 w,
NvS16 h,
NvS16 sx,
NvS16 sy,
NvS16 srcStride,
NvU8 *pColorBits,
NvU32 *pSrcColorKey);
/** This function copies a source bitmap from system memory to the video memory with a mono
pattern buffer combination.
The source bitmap's color depth must match the destination's video memory's color depth.
Source and mono pattern transparencies are supported.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param srcStride (NvS16) source stride in bytes, must be pixel size aligned
@param pColorBits (NvU8*) pointer to color bitmap
@param pSrcColorKey (NvU32*) pointer to source color key. If NULL no transparency.
@param rop3 (NvU8) raster operation code
@param pPatBuffer (NvU8*) pointer to pattern buffer
@param patFgColor (NvU32) pattern foreground color
@param patBgColor (NvU32) pattern background color
@param patW, patH (NvU32) width & height of pattern buffer
@param patStride (NvU32) pattern stride in bytes
@param pSelectPatTrans (NvU16*) pointer to pattern color key. If NULL no transparency.
Depending of pattern size, replicated mode is used or not.
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyTransColorBitmap(), GFGxCopyColorBitmap()
*/
GF_RETTYPE GFGxCopyTransColorBitmapWithMonoPattern(GFGxHandle GxHandle,
NvS16 dx,
NvS16 dy,
NvS16 w,
NvS16 h,
NvS16 sx,
NvS16 sy,
NvS16 srcStride,
NvU8 *pColorBits,
NvU32 *pSrcColorKey,
NvU8 rop3,
NvU8 *pPatBuffer,
NvU32 patFgColor,
NvU32 patBgColor,
NvU32 patW,
NvU32 patH,
NvU32 patStride,
NvU16 *pSelectPatTrans);
/** This function copies a source bitmap from system memory to the video memory with a colour
pattern buffer combination.
The source bitmap and pattern's color depth must match the destination's video memory's color depth.
Source and color pattern transparencies are supported.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param srcStride (NvS16) source stride in bytes, must be pixel size aligned
@param pColorBits (NvU8*) pointer to color bitmap
@param pSrcColorKey (NvU32*) pointer to source color key. If NULL no transparency.
@param rop3 (NvU8) raster operation code
@param pPatBuffer (NvU8*) pointer to pattern buffer
@param patW, patH (NvU32) width & height of pattern buffer
@param patStride (NvU32) pattern stride in bytes
@param pPatColorKey (NvU32*) pointer to pattern color key. If NULL no transparency.
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyTransColorBitmap(), GFGxCopyColorBitmap(), GFGxCopyTransColorBitmapWithMonoPattern()
*/
GF_RETTYPE GFGxCopyTransColorBitmapWithColorPattern(GFGxHandle GxHandle,
NvS16 dx,
NvS16 dy,
NvS16 w,
NvS16 h,
NvS16 sx,
NvS16 sy,
NvS16 srcStride,
NvU8 *pColorBits,
NvU32 *pSrcColorKey,
NvU8 rop3,
NvU8 *pPatBuffer,
NvU32 patW,
NvU32 patH,
NvU32 patStride,
NvU32 *pPatColorKey);
/** This function copies a source bitmap from system memory to the video memory with a mono
pattern buffer combination.
The source bitmap and pattern are mono (1BPP).
Mono source and mono pattern transparencies are supported.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param srcFgColor (NvU32) source foreground color
@param srcBgColor (NvU32) source background color
@param srcStride (NvS16) source stride in bytes
@param pMonoBits (NvU8*) pointer to source bitmap
@param pSelectSrcTrans (NvU16*) pointer to source color key. If NULL no transparency.
@param rop3 (NvU8) raster operation code
@param pPatBuffer (NvU8*) pointer to pattern buffer
@param patFgColor (NvU32) pattern foreground color
@param patBgColor (NvU32) pattern background color
@param patW, patH (NvU32) width & height of pattern buffer
@param patStride (NvU32) pattern stride in bytes
@param pSelectPatTrans (NvU16*) pointer to pattern color key. If NULL no transparency.
Depending of pattern size, replicated mode is used or not.
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyTransColorBitmap(), GFGxCopyTransMonoBitmap()
*/
GF_RETTYPE GFGxCopyTransMonoBitmapWithMonoPattern(GFGxHandle GxHandle,
NvS16 dx,
NvS16 dy,
NvS16 w,
NvS16 h,
NvS16 sx,
NvS16 sy,
NvU32 srcFgColor,
NvU32 srcBgColor,
NvS16 srcStride,
NvU8 *pMonoBits,
NvU16 *pSelectSrcTrans,
NvU8 rop3,
NvU8 *pPatBuffer,
NvU32 patFgColor,
NvU32 patBgColor,
NvU32 patW,
NvU32 patH,
NvU32 patStride,
NvU16 *pSelectPatTrans);
/** This function copies a source bitmap from system memory to the video memory with a color
pattern buffer combination.
The source bitmap is mono (1BPP).
Mono source and color pattern transparencies are supported.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@param dx,dy (NvS16) left-top corner of destination rectangle
@param w,h (NvS16) width & height of the rectangle in pixels and scan lines
@param sx,sy (NvS16) left-top corner of source rectangle
@param srcFgColor (NvU32) source foreground color
@param srcBgColor (NvU32) source background color
@param srcStride (NvS16) source stride in bytes
@param pMonoBits (NvU8*) pointer to source bitmap
@param pSelectSrcTrans (NvU16*) pointer to source color key. If NULL no transparency.
@param rop3 (NvU8) raster operation code
@param pPatBuffer (NvU8*) pointer to pattern buffer
@param patW, patH (NvU32) width & height of pattern buffer
@param patStride (NvU32) pattern stride in bytes
@param pPatColorKey (NvU32*) pointer to pattern color key. If NULL no transparency.
@retval #GF_SUCCESS Success
@retval #GF_ERROR Some error occured
@see GFGxCopyTransMonoBitmap(), GFGxCopyTransMonoBitmapWithMonoPattern()
*/
GF_RETTYPE GFGxCopyTransMonoBitmapWithColorPattern(GFGxHandle GxHandle,
NvS16 dx,
NvS16 dy,
NvS16 w,
NvS16 h,
NvS16 sx,
NvS16 sy,
NvU32 srcFgColor,
NvU32 srcBgColor,
NvS16 srcStride,
NvU8 *pMonoBits,
NvU16 *pSelectSrcTrans,
NvU8 rop3,
NvU8 *pPatBuffer,
NvU32 patW,
NvU32 patH,
NvU32 patStride,
NvU32 *pPatColorKey);
/** This function purges the graphics cache used to store pattern buffers when
GFGX_BLT_PAT_CACHE is used.
@param GxHandle (#GFGxHandle) Handle to GFGxAPI
@retval #GF_SUCCESS Success
@retval #GFGX_ERROR_NULL_PARAMETER Invalid GxHandle
@see GFGxBlt()
*/
GF_RETTYPE GFGxCachePurge(GFGxHandle GxHandle);
// Typesafe functions for opening and closing this component
GF_RETTYPE GFGxOpen(GFRmHandle hRm, GFGxHandle *phGx,
GF_STATE_TYPE state, GFRmChHandle hCh);
void GFGxClose(GFGxHandle *phGx);
/*@}*/
/*@}*/
#ifdef __cplusplus
}
#endif
/** @page pageGxAppNotes GxAPI Application Notes
@section pageGxAppNotes1 Todo
*/
#endif // _GFGx_H_