diff options
Diffstat (limited to 'otherlibs/graph/point_col.c')
-rw-r--r-- | otherlibs/graph/point_col.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/otherlibs/graph/point_col.c b/otherlibs/graph/point_col.c new file mode 100644 index 000000000..757cf4720 --- /dev/null +++ b/otherlibs/graph/point_col.c @@ -0,0 +1,17 @@ +#include "libgraph.h" + +value gr_point_color(vx, vy) + value vx, vy; +{ + int x = Int_val(vx); + int y = Int_val(vy); + XImage * im; + int rgb; + + im = XGetImage(grdisplay, grbstore.win, x, Bcvt(y), 1, 1, (-1), ZPixmap); + rgb = gr_rgb_pixel(XGetPixel(im, 0, 0)); + XDestroyImage(im); + return Val_int(rgb); +} + + |