X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=mware%2Fgfx.h;h=a878eabb81b6156d0a020e95c18b75302c05f91e;hb=646a88d7412eec847c282b9b2050b3a37a9af7a5;hp=792a49c39bd7b864b9c0792f9515a531da362e9f;hpb=277b540c0764dd376dcf583acdc97a2b2fd3d8e6;p=bertos.git diff --git a/mware/gfx.h b/mware/gfx.h index 792a49c3..a878eabb 100755 --- a/mware/gfx.h +++ b/mware/gfx.h @@ -1,8 +1,8 @@ /*! * \file - * Copyright (C) 2003,2004 Develer S.r.l. (http://www.develer.com/) - * Copyright (C) 1999 Bernardo Innocenti - * This file is part of DevLib - See devlib/README for information. + * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/) + * Copyright 1999 Bernardo Innocenti + * This file is part of DevLib - See README.devlib for information. * * \version $Id$ * @@ -14,8 +14,26 @@ /*#* *#* $Log$ - *#* Revision 1.5 2004/08/25 14:12:09 rasky - *#* Aggiornato il comment block dei log RCS + *#* Revision 1.12 2005/11/04 16:20:02 bernie + *#* Fix reference to README.devlib in header. + *#* + *#* Revision 1.11 2005/04/11 19:10:28 bernie + *#* Include top-level headers from cfg/ subdir. + *#* + *#* Revision 1.10 2005/03/01 23:26:45 bernie + *#* Use new CPU-neutral program-memory API. + *#* + *#* Revision 1.9 2005/01/20 18:46:31 aleph + *#* Fix progmem includes. + *#* + *#* 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. *#* *#* Revision 1.4 2004/08/10 07:00:16 bernie *#* Add missing header. @@ -28,26 +46,14 @@ *#* *#* Revision 1.1 2004/05/23 15:43:16 bernie *#* Import mware modules. - *#* - *#* Revision 1.4 2004/02/09 00:21:28 aleph - *#* Various gfx fixes - *#* - *#* Revision 1.3 2004/01/27 23:24:19 aleph - *#* Add new graphics primitives - *#* - *#* Revision 1.2 2004/01/07 23:33:01 aleph - *#* Change copyright email - *#* - *#* Revision 1.1 2004/01/07 19:05:31 aleph - *#* Add graphics routines - *#* *#*/ #ifndef MWARE_GFX_H #define MWARE_GFX_H -#include -#include +#include +#include +#include /*! Common type for coordinates expressed in pixel units */ @@ -87,22 +93,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_FillRect(Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); -extern void gfx_DrawRect(Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); -extern void gfx_ClearRect(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); +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_HARVARD + #include + extern void gfx_blit_P(Bitmap *bm, const pgm_uint8_t *raster); +#endif + #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 */