Add another rasterizer

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1314 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2008-11-26 19:39:54 +00:00
parent e77aa25163
commit 347bc09e47
11 changed files with 283 additions and 54 deletions
+83 -3
View File
@@ -68,8 +68,8 @@ struct nxgl_point_s
struct nxgl_rect_s
{
struct nxgl_point_t pt1; /* Upper, left-hand corner */
struct nxgl_point_t pt2; /* Lower, right-hand corner */
struct nxgl_point_s pt1; /* Upper, left-hand corner */
struct nxgl_point_s pt2; /* Lower, right-hand corner */
};
/****************************************************************************
@@ -88,11 +88,91 @@ extern "C" {
* Public Function Prototypes
****************************************************************************/
/* Color conversons */
/* Color conversons *********************************************************/
/****************************************************************************
* Name: nxgl_rgb2yuv
*
* Description:
* Convert 8-bit RGB triplet to 8-bit YUV triplet
*
****************************************************************************/
EXTERN void nxgl_rgb2yuv(ubyte r, ubyte g, ubyte b, ubyte *y, ubyte *u, ubyte *v);
/****************************************************************************
* Name: nxgl_yuv2rgb
*
* Description:
* Convert 8-bit RGB triplet to 8-bit YUV triplet
*
****************************************************************************/
EXTERN void nxgl_yuv2rgb(ubyte y, ubyte u, ubyte v, ubyte *r, ubyte *g, ubyte *b);
/* Rasterizers **************************************************************/
/****************************************************************************
* Name: nxgl_fillrectangle_*bpp
*
* Descripton:
* Fill a rectangle region in the framebuffer memory with a fixed color
*
****************************************************************************/
EXTERN void nxgl_fillrectangle_1bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
ubyte color);
EXTERN void nxgl_fillrectangle_2bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
ubyte color);
EXTERN void nxgl_fillrectangle_4bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
ubyte color);
EXTERN void nxgl_fillrectangle_8bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
ubyte color);
EXTERN void nxgl_fillrectangle_16bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
uint16 color);
EXTERN void nxgl_fillrectangle_24bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
uint32 color);
EXTERN void nxgl_fillrectangle_32bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
uint32 color);
/****************************************************************************
* Name: nxgl_moverectangle_*bpp
*
* Descripton:
* Move a rectangular region from location to another in the
* framebuffer memory.
*
****************************************************************************/
EXTERN void nxgl_moverectangle_1bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR struct nxgl_point_s *offset);
EXTERN void nxgl_moverectangle_2bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR struct nxgl_point_s *offset);
EXTERN void nxgl_moverectangle_4bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR struct nxgl_point_s *offset);
EXTERN void nxgl_moverectangle_8bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR struct nxgl_point_s *offset);
EXTERN void nxgl_moverectangle_16bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR struct nxgl_point_s *offset);
EXTERN void nxgl_moverectangle_24bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR struct nxgl_point_s *offset);
EXTERN void nxgl_moverectangle_32bpp(FAR struct fb_planeinfo_s *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR struct nxgl_point_s *offset);
#undef EXTERN
#if defined(__cplusplus)
}