This is the elipse drawing patch for the cli_c.
ChangeLog Entry:
2001-05-30 � �Shane Nay <[EMAIL PROTECTED]>
Added ellipse, and filled elipse drawing to pgfx for use on canvases.
� � � * cli_c/src/pgfx_canvas.c: Added the mapping for rendering of ellipses.
� � � * cli_c/include/picogui/pgfx.h: Added function pointers for fellipse
� � � � �and ellipse to struct pgfx_lib.
� � � * cli_c/include/picogui/constants.h: Added PG_GROP_ELLIPSE and
� � � � �PG_GROP_FELLIPSE.
Index: include/picogui/constants.h
===================================================================
RCS file: /cvsroot/pgui/cli_c/include/picogui/constants.h,v
retrieving revision 1.47
diff -u -r1.47 constants.h
--- include/picogui/constants.h 2001/05/17 04:46:36 1.47
+++ include/picogui/constants.h 2001/05/31 02:39:10
@@ -534,6 +534,8 @@
#define PG_GROP_BAR 0x30
#define PG_GROP_PIXEL 0x40
#define PG_GROP_LINE 0x50
+#define PG_GROP_ELLIPSE 0x60
+#define PG_GROP_FELLIPSE 0x70
#define PG_GROP_TEXT 0x04 //!< Param: string
#define PG_GROP_BITMAP 0x14 //!< Param: bitmap
#define PG_GROP_TILEBITMAP 0x24 //!< Param: bitmap
Index: include/picogui/pgfx.h
===================================================================
RCS file: /cvsroot/pgui/cli_c/include/picogui/pgfx.h,v
retrieving revision 1.10
diff -u -r1.10 pgfx.h
--- include/picogui/pgfx.h 2001/05/16 04:22:56 1.10
+++ include/picogui/pgfx.h 2001/05/31 02:39:10
@@ -129,6 +129,10 @@
pgprim (*slab) (pgcontext c, pgu x, pgu y, pgu w);
//! Implementation of pgBar
pgprim (*bar) (pgcontext c, pgu x, pgu y, pgu h);
+ //! Implementation of pgEllipse
+ pgprim (*ellipse) (pgcontext c, pgu x, pgu y, pgu w, pgu h);
+ //! Implementation of pgFEllipse
+ pgprim (*fellipse) (pgcontext c, pgu x, pgu y, pgu w, pgu h);
//! Implementation of pgText
pgprim (*text) (pgcontext c, pgu x, pgu y, pghandle string);
//! Implementation of pgBitmap
Index: src/pgfx_canvas.c
===================================================================
RCS file: /cvsroot/pgui/cli_c/src/pgfx_canvas.c,v
retrieving revision 1.7
diff -u -r1.7 pgfx_canvas.c
--- src/pgfx_canvas.c 2001/05/10 03:05:36 1.7
+++ src/pgfx_canvas.c 2001/05/31 02:39:11
@@ -60,6 +60,16 @@
return 0;
}
+pgprim _pgfxcanvas_ellipse(pgcontext c, pgu x, pgu y, pgu w, pgu h) {
+ pgWriteCmd(c->device,PGCANVAS_GROP,5,PG_GROP_ELLIPSE,x,y,w,h);
+ return 0;
+}
+
+pgprim _pgfxcanvas_fellipse(pgcontext c, pgu x, pgu y, pgu w, pgu h) {
+ pgWriteCmd(c->device,PGCANVAS_GROP,5,PG_GROP_FELLIPSE,x,y,w,h);
+ return 0;
+}
+
pgprim _pgfxcanvas_text(pgcontext c, pgu x, pgu y, pghandle string) {
pgWriteCmd(c->device,PGCANVAS_GROP,6,PG_GROP_TEXT,x,y,1,1,string);
return 0;
@@ -140,6 +150,8 @@
l.frame = _pgfxcanvas_frame;
l.slab = _pgfxcanvas_slab;
l.bar = _pgfxcanvas_bar;
+ l.ellipse = _pgfxcanvas_ellipse;
+ l.fellipse = _pgfxcanvas_fellipse;
l.text = _pgfxcanvas_text;
l.bitmap = _pgfxcanvas_bitmap;
l.tilebitmap = _pgfxcanvas_tilebitmap;
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/pgui-devel