X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=mware%2Fgfx.h;h=b2804157cb0a605fdcc1412e8470b780b5364e6a;hb=0ae1a254c74788c7e22f22dcfe9be5a02ec6b270;hp=0239ad1754b3616cf3c466f9978d6a9d5244e8ac;hpb=3de08905b69c6f2d02eed601fbf546811ec1043e;p=bertos.git diff --git a/mware/gfx.h b/mware/gfx.h index 0239ad17..b2804157 100755 --- a/mware/gfx.h +++ b/mware/gfx.h @@ -14,6 +14,12 @@ /*#* *#* $Log$ + *#* Revision 1.8 2004/11/01 15:14:07 bernie + *#* Update to current coding conventions. + *#* + *#* Revision 1.7 2004/09/20 03:29:06 bernie + *#* Conditionalize AVR-specific code. + *#* *#* Revision 1.6 2004/09/14 21:01:08 bernie *#* Rename rectangle drawing functions; Unify filled/cleared implementations. *#* @@ -74,28 +80,28 @@ typedef struct Bitmap /* Function prototypes */ -extern void gfx_InitBitmap(Bitmap *bm, uint8_t *raster, coord_t w, coord_t h); -extern void gfx_ClearBitmap(Bitmap *bm); -extern void gfx_blitBitmap_P(Bitmap *bm, const prog_uchar *raster); -extern void gfx_DrawLine(Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); -extern void gfx_RectDraw(Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); -extern void gfx_RectFillC(Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t color); -extern void gfx_RectFill(Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); -extern void gfx_RectClear(Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); -extern void gfx_MoveTo(Bitmap *bm, coord_t x, coord_t y); -extern void gfx_LineTo(Bitmap *bm, coord_t x, coord_t y); -extern void gfx_SetClipRect(Bitmap *bm, coord_t xmin, coord_t ymin, coord_t xmax, coord_t ymax); - -/* DEPRECATED names */ -#define gfx_DrawRect gfx_RectDraw -#define gfx_FillRect gfx_RectFill -#define gfx_ClearRect gfx_RectClear +extern void gfx_bitmapInit (Bitmap *bm, uint8_t *raster, coord_t w, coord_t h); +extern void gfx_bitmapClear(Bitmap *bm); +extern void gfx_line (Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); +extern void gfx_rectDraw (Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); +extern void gfx_rectFillC (Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t color); +extern void gfx_rectFill (Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); +extern void gfx_rectClear (Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); +extern void gfx_moveTo (Bitmap *bm, coord_t x, coord_t y); +extern void gfx_lineTo (Bitmap *bm, coord_t x, coord_t y); +extern void gfx_setClipRect(Bitmap *bm, coord_t xmin, coord_t ymin, coord_t xmax, coord_t ymax); + +#if CPU_AVR + #include + extern void gfx_blit_P(Bitmap *bm, const prog_uchar *raster); +#endif /* CPU_AVR */ + #if CONFIG_GFX_VCOORDS -extern void gfx_SetViewRect(Bitmap *bm, vcoord_t x1, vcoord_t y1, vcoord_t x2, vcoord_t y2); -extern coord_t gfx_TransformX(Bitmap *bm, vcoord_t x); -extern coord_t gfx_TransformY(Bitmap *bm, vcoord_t y); -extern void gfx_VDrawLine(Bitmap *bm, vcoord_t x1, vcoord_t y1, vcoord_t x2, vcoord_t y2); +extern void gfx_setViewRect(Bitmap *bm, vcoord_t x1, vcoord_t y1, vcoord_t x2, vcoord_t y2); +extern coord_t gfx_transformX(Bitmap *bm, vcoord_t x); +extern coord_t gfx_transformY(Bitmap *bm, vcoord_t y); +extern void gfx_vline(Bitmap *bm, vcoord_t x1, vcoord_t y1, vcoord_t x2, vcoord_t y2); #endif /* CONFIG_GFX_VCOORDS */ #endif /* MWARE_GFX_H */