diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1997-03-08 12:17:35 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1997-03-08 12:17:35 +0000 |
commit | 537ecc5749d0b159254b4540aee58f2a11c1c677 (patch) | |
tree | 141f166863827ad91515303048e2b0351d772cdd /otherlibs/graph | |
parent | 9db684700b7197c8866da5f3504cce449a25d900 (diff) |
Ajout de gc_check_open oublies
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1345 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/graph')
-rw-r--r-- | otherlibs/graph/draw.c | 4 | ||||
-rw-r--r-- | otherlibs/graph/fill.c | 3 | ||||
-rw-r--r-- | otherlibs/graph/point_col.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/otherlibs/graph/draw.c b/otherlibs/graph/draw.c index c6cacffa6..52b8e9e05 100644 --- a/otherlibs/graph/draw.c +++ b/otherlibs/graph/draw.c @@ -19,6 +19,7 @@ value gr_plot(vx, vy) { int x = Int_val(vx); int y = Int_val(vy); + gr_check_open(); XDrawPoint(grdisplay, grwindow.win, grwindow.gc, x, Wcvt(y)); XDrawPoint(grdisplay, grbstore.win, grbstore.gc, x, Bcvt(y)); XFlush(grdisplay); @@ -47,6 +48,7 @@ value gr_lineto(vx, vy) { int x = Int_val(vx); int y = Int_val(vy); + gr_check_open(); XDrawLine(grdisplay, grwindow.win, grwindow.gc, grx, Wcvt(gry), x, Wcvt(y)); XDrawLine(grdisplay, grbstore.win, grbstore.gc, @@ -67,6 +69,7 @@ value gr_draw_arc_nat(vx, vy, vrx, vry, va1, va2) int a1 = Int_val(va1); int a2 = Int_val(va2); + gr_check_open(); XDrawArc(grdisplay, grwindow.win, grwindow.gc, x - rx, Wcvt(y) - ry, rx * 2, ry * 2, a1 * 64, (a2 - a1) * 64); XDrawArc(grdisplay, grbstore.win, grbstore.gc, @@ -86,6 +89,7 @@ value gr_set_line_width(vwidth) value vwidth; { int width = Int_val(vwidth); + gr_check_open(); XSetLineAttributes(grdisplay, grwindow.gc, width, LineSolid, CapRound, JoinRound); XSetLineAttributes(grdisplay, grbstore.gc, diff --git a/otherlibs/graph/fill.c b/otherlibs/graph/fill.c index edf75925e..b00357f60 100644 --- a/otherlibs/graph/fill.c +++ b/otherlibs/graph/fill.c @@ -22,6 +22,7 @@ value gr_fill_rect(vx, vy, vw, vh) int w = Int_val(vw); int h = Int_val(vh); + gr_check_open(); XFillRectangle(grdisplay, grwindow.win, grwindow.gc, x, Wcvt(y) - h + 1, w, h); XFillRectangle(grdisplay, grbstore.win, grbstore.gc, @@ -36,6 +37,7 @@ value gr_fill_poly(array) XPoint * points; int npoints, i; + gr_check_open(); npoints = Wosize_val(array); points = (XPoint *) stat_alloc(npoints * sizeof(XPoint)); for (i = 0; i < npoints; i++) { @@ -64,6 +66,7 @@ value gr_fill_arc_nat(vx, vy, vrx, vry, va1, va2) int a1 = Int_val(va1); int a2 = Int_val(va2); + gr_check_open(); XFillArc(grdisplay, grwindow.win, grwindow.gc, x - rx, Wcvt(y) - ry, rx * 2, ry * 2, a1 * 64, (a2 - a1) * 64); XFillArc(grdisplay, grbstore.win, grbstore.gc, diff --git a/otherlibs/graph/point_col.c b/otherlibs/graph/point_col.c index b45414166..541c653e3 100644 --- a/otherlibs/graph/point_col.c +++ b/otherlibs/graph/point_col.c @@ -21,6 +21,7 @@ value gr_point_color(vx, vy) XImage * im; int rgb; + gr_check_open(); im = XGetImage(grdisplay, grbstore.win, x, Bcvt(y), 1, 1, (-1), ZPixmap); rgb = gr_rgb_pixel(XGetPixel(im, 0, 0)); XDestroyImage(im); |