Index: trunk/Ohana/src/kapa2/include/structures.h
===================================================================
--- trunk/Ohana/src/kapa2/include/structures.h	(revision 40569)
+++ trunk/Ohana/src/kapa2/include/structures.h	(revision 40570)
@@ -137,5 +137,5 @@
   double lweight, size;
   double x0, x1, y0, y1;  /* limits for this object */
-  float alpha;
+  double alpha;
 } Gobjects;
 
Index: trunk/Ohana/src/kapa2/src/LoadObject.c
===================================================================
--- trunk/Ohana/src/kapa2/src/LoadObject.c	(revision 40569)
+++ trunk/Ohana/src/kapa2/src/LoadObject.c	(revision 40570)
@@ -24,9 +24,9 @@
   graph[0].objects[N].dym = graph[0].objects[N].dyp = (float *) NULL;
   
-  KiiScanMessage (sock, "%d %d %d %d %d %d %d %lf %lf",
+  KiiScanMessage (sock, "%d %d %d %d %d %d %d %lf %lf %lf",
 		  &graph[0].objects[N].Npts, &graph[0].objects[N].style, 
 		  &graph[0].objects[N].ptype, &graph[0].objects[N].ltype, 
 		  &graph[0].objects[N].etype, &graph[0].objects[N].ebar, 
-		  &graph[0].objects[N].color, 
+		  &graph[0].objects[N].color, &graph[0].objects[N].alpha, 
 		  &graph[0].objects[N].lweight, &graph[0].objects[N].size);
   
Index: trunk/Ohana/src/kapa2/src/bDrawObjects.c
===================================================================
--- trunk/Ohana/src/kapa2/src/bDrawObjects.c	(revision 40569)
+++ trunk/Ohana/src/kapa2/src/bDrawObjects.c	(revision 40570)
@@ -30,5 +30,5 @@
   
   int weight = MAX (0, MIN (10, object->lweight));
-  bDrawSetStyle (buffer, object->color, weight, object->ltype, 1.0);
+  bDrawSetStyle (buffer, object->color, weight, object->ltype, object->alpha);
   
   switch (object->style) {
Index: trunk/Ohana/src/libkapa/src/KapaWindow.c
===================================================================
--- trunk/Ohana/src/libkapa/src/KapaWindow.c	(revision 40569)
+++ trunk/Ohana/src/libkapa/src/KapaWindow.c	(revision 40570)
@@ -99,4 +99,5 @@
   graphdata[0].etype = graphdata[0].ebar = 0;
   graphdata[0].lweight = graphdata[0].size = 1.0;
+  graphdata[0].alpha = 1.0;
     
   InitCoords (&graphdata[0].coords, "DEC--LIN");
@@ -139,9 +140,9 @@
   
   /* send kapa the plot details */
-  KiiSendMessage (fd, "%8d %8d %d %d %d %d %d %f %f ", 
+  KiiSendMessage (fd, "%8d %8d %d %d %d %d %d %f %f %f ", 
 		  Npts, data[0].style, 
 		  data[0].ptype, data[0].ltype, 
 		  data[0].etype, data[0].ebar, data[0].color, 
-		  data[0].lweight, data[0].size);
+		  data[0].alpha, data[0].lweight, data[0].size);
   KiiSendMessage (fd, "%g %g %g %g ", 
 		  data[0].xmin, data[0].xmax, 
@@ -158,9 +159,9 @@
 		  data[0].ymin, data[0].ymax);
 
-  KiiSendMessage (fd, "%8d %d %d %d %d %d %f %f ", 
+  KiiSendMessage (fd, "%8d %d %d %d %d %d %f %f %f ", 
 		  data[0].style, 
 		  data[0].ptype, data[0].ltype, 
 		  data[0].etype, data[0].ebar, data[0].color, 
-		  data[0].lweight, data[0].size);
+		  data[0].alpha, data[0].lweight, data[0].size);
 
   KiiSendMessage (fd, "%g %g %g %g %g ", 
@@ -209,9 +210,9 @@
 		  &data[0].ymin, &data[0].ymax);
 
-  KiiScanMessage (fd, "%d %d %d %d %d %d %lf %lf", 
+  KiiScanMessage (fd, "%d %d %d %d %d %d %lf %lf %lf", 
 		  &data[0].style, 
 		  &data[0].ptype, &data[0].ltype, 
 		  &data[0].etype, &data[0].ebar, &data[0].color, 
-		  &data[0].lweight, &data[0].size);
+		  &data[0].alpha, &data[0].lweight, &data[0].size);
 
   KiiScanMessage (fd, "%lf %lf %lf %lf %lf", 
Index: trunk/Ohana/src/libkapa/src/bDrawFuncs.c
===================================================================
--- trunk/Ohana/src/libkapa/src/bDrawFuncs.c	(revision 40569)
+++ trunk/Ohana/src/libkapa/src/bDrawFuncs.c	(revision 40570)
@@ -437,29 +437,132 @@
 }
 
+// draw points in a pure circle, using symmetry, but only draw a point once
+void bDrawCirclePoints (bDrawBuffer *buffer, int Xc, int Yc, int x, int y) {
+
+  if (x == 0) {
+    bDrawPoint (buffer, Xc,     Yc + y);
+    bDrawPoint (buffer, Xc,     Yc - y);
+    bDrawPoint (buffer, Xc + y, Yc);
+    bDrawPoint (buffer, Xc - y, Yc);
+    return;
+  }
+
+  if (x == y) {
+    bDrawPoint (buffer, Xc + x, Yc + y);
+    bDrawPoint (buffer, Xc - x, Yc + y);
+    bDrawPoint (buffer, Xc + x, Yc - y);
+    bDrawPoint (buffer, Xc - x, Yc - y);
+    return;
+  }
+
+  bDrawPoint (buffer, Xc + x, Yc + y);
+  bDrawPoint (buffer, Xc + x, Yc - y);
+  bDrawPoint (buffer, Xc - x, Yc + y);
+  bDrawPoint (buffer, Xc - x, Yc - y);
+  bDrawPoint (buffer, Xc + y, Yc + x);
+  bDrawPoint (buffer, Xc + y, Yc - x);
+  bDrawPoint (buffer, Xc - y, Yc + x);
+  bDrawPoint (buffer, Xc - y, Yc - x);
+}
+
+# define VERSION_A 0
+# define VERSION_B 0
+# define VERSION_C 1
+
+/* I am using version C, but I really should consider using the algorithm describe in
+   Bresenham.pdf for an ellipse inside a rectangle (this allows 1/2 int steps for the
+   radius)
+ */
+
+# if (VERSION_A) 
 // draw a pure circle  
 void bDrawCircleSingle (bDrawBuffer *buffer, double xc, double yc, double radius) {
 
-  int Xc, Yc, Radius;
-  int x, y, d;
-
-  Xc = ROUND(xc);
-  Yc = ROUND(yc);
-  Radius = ROUND(radius);
-
-  x = 0;
-  y = Radius;
+  int Xc = ROUND(xc);
+  int Yc = ROUND(yc);
+  int Radius = ROUND(radius);
+
+  // fprintf (stderr, "radius: %d\n", Radius);
+
+  int x = Radius - 1;
+  int y = 0;
+  int dx = 1;
+  int dy = 1;
+
+  int err = dx - (Radius << 1);
+
+  while (x >= y) {
+    bDrawCirclePoints (buffer, Xc, Yc, x, y);
+
+    if (err <= 0) {
+      y++;
+      err += dy;
+      dy += 2;
+    }
+
+    if (err > 0) {
+      x--;
+      dx += 2;
+      err += dx - (Radius << 1);
+    }
+  }
+  return;
+}
+# endif
+
+# if (VERSION_B) 
+// draw a pure circle  
+void bDrawCircleSingle (bDrawBuffer *buffer, double xc, double yc, double radius) {
+
+  int Xc = ROUND(xc);
+  int Yc = ROUND(yc);
+  int Radius = ROUND(radius);
+
+  // fprintf (stderr, "radius: %d\n", Radius);
+
+  int x = 0;
+  int y = Radius;
 
   // d = 3 - 2*Radius;
-  d = 5 - 4*radius;
+  int d = (5 - 4*radius) / 4;
+
+  bDrawCirclePoints (buffer, Xc, Yc, x, y);
+
+  while (x < y) {
+    x++;
+    if (d < 0) {
+      d += 2*x + 1;
+    } else {
+      y--;
+      d += 2*(x-y) + 1;
+    }
+    bDrawCirclePoints (buffer, Xc, Yc, x, y);
+  }
+  return;
+}
+# endif
+
+# if (VERSION_C)
+// draw a pure circle  
+void bDrawCircleSingle (bDrawBuffer *buffer, double xc, double yc, double radius) {
+
+  int Xc = ROUND(xc);
+  int Yc = ROUND(yc);
+  int Radius = ROUND(radius);
+
+  if (Radius == 0) {
+    bDrawCirclePoints (buffer, Xc, Yc, 0, 0);
+  }
+
+  // fprintf (stderr, "P radius: %f -> %d\n", radius, Radius);
+
+  int x = 0;
+  int y = Radius;
+
+  // d = 3 - 2*Radius;
+  int d = 5 - 4*radius;
 
   while (x <= y) {
-    bDrawPoint (buffer, Xc+x, Yc+y);
-    bDrawPoint (buffer, Xc+x, Yc-y);
-    bDrawPoint (buffer, Xc-x, Yc+y);
-    bDrawPoint (buffer, Xc-x, Yc-y);
-    bDrawPoint (buffer, Xc+y, Yc+x);
-    bDrawPoint (buffer, Xc+y, Yc-x);
-    bDrawPoint (buffer, Xc-y, Yc+x);
-    bDrawPoint (buffer, Xc-y, Yc-x);
+    bDrawCirclePoints (buffer, Xc, Yc, x, y);
 
     if (d < 0) {
@@ -474,4 +577,39 @@
   }
 }
+# endif
+
+// draw a pure circle  
+void bDrawCircleLines (bDrawBuffer *buffer, int Xc, int Yc, int x, int ys, int decrementY) {
+
+  int y = ys;
+  if (decrementY) y ++;
+
+  if (x == 0) {
+    if (decrementY) {
+      bDrawLineHorizontal (buffer, Xc    , Xc + 1, Yc + y);
+      bDrawLineHorizontal (buffer, Xc    , Xc + 1, Yc - y);
+    }
+
+    // center line 
+    bDrawLineHorizontal (buffer, Xc - y, Xc + y + 1, Yc    );
+    return;
+  }
+
+  if (x == y) {
+    bDrawLineHorizontal (buffer, Xc - x, Xc + x + 1, Yc + y);
+    bDrawLineHorizontal (buffer, Xc - x, Xc + x + 1, Yc - y);
+    return;
+  }
+
+  // only draw these two lines if we decrement y
+  if (decrementY) {
+    bDrawLineHorizontal (buffer, Xc - x, Xc + x + 1, Yc + y);
+    bDrawLineHorizontal (buffer, Xc - x, Xc + x + 1, Yc - y);
+  }
+
+  // always draw these two lines:
+  bDrawLineHorizontal (buffer, Xc - y, Xc + y + 1, Yc + x);
+  bDrawLineHorizontal (buffer, Xc - y, Xc + y + 1, Yc - x);
+}
 
 // draw a pure circle  
@@ -492,9 +630,10 @@
 
   while (x <= y) {
-    bDrawLineHorizontal (buffer, Xc-x, Xc+x, Yc+y);
-    bDrawLineHorizontal (buffer, Xc-x, Xc+x, Yc-y);
-    bDrawLineHorizontal (buffer, Xc-y, Xc+y, Yc+x);
-    bDrawLineHorizontal (buffer, Xc-y, Xc+y, Yc-x);
-
+    // bDrawLineHorizontal (buffer, Xc-x, Xc+x, Yc+y);
+    // bDrawLineHorizontal (buffer, Xc-x, Xc+x, Yc-y);
+    // bDrawLineHorizontal (buffer, Xc-y, Xc+y, Yc+x);
+    // bDrawLineHorizontal (buffer, Xc-y, Xc+y, Yc-x);
+
+    int decrementY = FALSE;
     if (d < 0) {
       // d = d + 4*x + 6;
@@ -504,5 +643,7 @@
       d = d + 8*(x-y) + 8;
       y--;
-    }
+      decrementY = TRUE;
+    }
+    bDrawCircleLines (buffer, Xc, Yc, x, y, decrementY);
     x++;
   }
Index: trunk/Ohana/src/opihi/lib.data/style_args.c
===================================================================
--- trunk/Ohana/src/opihi/lib.data/style_args.c	(revision 40569)
+++ trunk/Ohana/src/opihi/lib.data/style_args.c	(revision 40570)
@@ -55,4 +55,9 @@
     remove_argument (N, argc, argv);
   }
+  if ((N = get_argument (*argc, argv, "-op"))) {
+    remove_argument (N, argc, argv);
+    graphmode[0].alpha = atof(argv[N]);
+    remove_argument (N, argc, argv);
+  }
   if ((N = get_argument (*argc, argv, "-c"))) {
     remove_argument (N, argc, argv);
