From: Alan W. Irwin <airwin@us...> - 2005-04-29 18:54:02
Update of /cvsroot/plplot/plplot/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23855/include
Straighten out build problems with gcw device.
* libgcw ==> gcw, everywhere since the dynamically loaded shared object
is not a library.
* The new library root name is libplplotcanvas.
* I couldn't get even the previous version of gcw.c to build without
including sys/stat.h. Without that include the struct stat buf; generates
an error because stat is not defined.
* I moved the physical dimensions out of gcw.c and put them into gcw.h
instead since the enlarged plplotcanvas.c also needs those dimensions now.
* I moved all the routines mentioned in gcw.h (including an additional one
that was not there before, plcolor_to_rgba) from gcw.c to plplotcanvas.c.
ToDo: static driver won't work. Other cleanups and refinements to be
discussed with Tom and Rafael.
RCS file: /cvsroot/plplot/plplot/include/gcw.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- gcw.h 27 Apr 2005 06:44:01 -0000 1.7
+++ gcw.h 29 Apr 2005 18:53:52 -0000 1.8
@@ -71,6 +71,24 @@
+/* Physical dimensions */
+/* mm per inch */
+#define MM_PER_IN (25.4)
+/* pixels per inch */
+#define PIXELS_PER_IN (133.333333)
+/* pixels per mm */
+#define PIXELS_PER_MM (PIXELS_PER_IN / MM_PER_IN)
+/* Default dimensions of the canvas (in inches) */
+#define CANVAS_WIDTH (10.)
+#define CANVAS_HEIGHT (7.)
+/* The zoom factor for 100% zoom in */
+#define ZOOM100 0.8
+#define ZOOMSTEP 1.25
/* Prototypes */
void gcw_set_canvas(PLStream* pls,GnomeCanvas* canvas);
@@ -86,3 +104,4 @@
void gcw_use_foreground_group(GnomeCanvas* canvas);
void gcw_use_background_group(GnomeCanvas* canvas);
void gcw_use_default_group(GnomeCanvas* canvas);
+guint32 plcolor_to_rgba(PLColor color, guchar alpha);
Get latest updates about Open Source Projects, Conferences and News.