summaryrefslogtreecommitdiff
path: root/Examples/GIFPlot/Ocaml/simple
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/GIFPlot/Ocaml/simple')
-rw-r--r--Examples/GIFPlot/Ocaml/simple/Makefile33
-rw-r--r--Examples/GIFPlot/Ocaml/simple/cmapbin768 -> 0 bytes
-rw-r--r--Examples/GIFPlot/Ocaml/simple/runme.ml35
-rw-r--r--Examples/GIFPlot/Ocaml/simple/simple.i33
4 files changed, 0 insertions, 101 deletions
diff --git a/Examples/GIFPlot/Ocaml/simple/Makefile b/Examples/GIFPlot/Ocaml/simple/Makefile
deleted file mode 100644
index 50492efc7..000000000
--- a/Examples/GIFPlot/Ocaml/simple/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-TOP = ../../..
-SWIG = $(TOP)/../swig
-SWIGOPT = -I../../Include
-SRCS =
-TARGET = gifsimple
-INTERFACE = simple.i
-LIBS = -L../.. -lgifplot -lm
-INCLUDES = -I../../Include
-MLFILE = simple.ml
-IOBJS = simple_wrap.o simple.cmo runme.cmo
-PROGFILE = runme.ml
-
-all:: static
-
-static::
- $(MAKE) -f $(TOP)/Makefile TOP='$(TOP)' \
- IOBJS='$(IOBJS)' PROGFILE='$(PROGFILE)' \
- SRCS='$(SRCS)' SWIG='$(SWIG)' MLFILE='$(MLFILE)' \
- INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
- TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ocaml_static
-
-dynamic::
- $(MAKE) -f $(TOP)/Makefile TOP='$(TOP)' \
- IOBJS='$(IOBJS)' PROGFILE='$(PROGFILE)' \
- SRCS='$(SRCS)' SWIG='$(SWIG)' MLFILE='$(MLFILE)' \
- INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
- TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ocaml_static
-
-clean::
- $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean
- rm -f *.gif
-
-check: all
diff --git a/Examples/GIFPlot/Ocaml/simple/cmap b/Examples/GIFPlot/Ocaml/simple/cmap
deleted file mode 100644
index a20c331a9..000000000
--- a/Examples/GIFPlot/Ocaml/simple/cmap
+++ /dev/null
Binary files differ
diff --git a/Examples/GIFPlot/Ocaml/simple/runme.ml b/Examples/GIFPlot/Ocaml/simple/runme.ml
deleted file mode 100644
index 3b6602cbc..000000000
--- a/Examples/GIFPlot/Ocaml/simple/runme.ml
+++ /dev/null
@@ -1,35 +0,0 @@
-(* Draw some simple shapes *)
-
-(* Use the wrapped GIFPlot library *)
-open Swig
-open Simple
-open Int32
-
-let _ = print_endline "Drawing some basic shapes"
-
-let cmap = _new_ColorMap (C_string "cmap")
-let f = _new_FrameBuffer (C_list [ C_int 400 ; C_int 400 ])
-
-(* Clear the picture *)
-let _ = _FrameBuffer_clear (C_list [ f ; _BLACK C_void ])
-
-(* Make a red box *)
-let _ = _FrameBuffer_box
- (C_list [ f ; C_int 40 ; C_int 40 ; C_int 200 ; C_int 200 ; _RED C_void ])
-
-(* Make a blue circle *)
-let _ = _FrameBuffer_circle
- (C_list [ f ; C_int 200 ; C_int 200 ; C_int 40 ; _BLUE C_void ])
-
-(* Make green line *)
-let _ = _FrameBuffer_line
- (C_list [ f ; C_int 10 ; C_int 390 ; C_int 390 ; C_int 200 ; _GREEN C_void ])
-
-(* Write an image out to disk *)
-
-let _ = _FrameBuffer_writeGIF (C_list [ f ; cmap ; C_string "image.gif" ])
-let _ = print_endline "Wrote image.gif"
-
-let _ = _delete_FrameBuffer f
-let _ = _delete_ColorMap cmap
-
diff --git a/Examples/GIFPlot/Ocaml/simple/simple.i b/Examples/GIFPlot/Ocaml/simple/simple.i
deleted file mode 100644
index 33297f491..000000000
--- a/Examples/GIFPlot/Ocaml/simple/simple.i
+++ /dev/null
@@ -1,33 +0,0 @@
-/* This example shows a very simple interface wrapping a few
- primitive declarations */
-
-%module simple
-%{
-#include "gifplot.h"
-%}
-
-typedef int Pixel;
-
-/* Here are a few useful functions */
-
-ColorMap *new_ColorMap(char *filename = 0);
-void delete_ColorMap(ColorMap *cmap);
-
-FrameBuffer *new_FrameBuffer(unsigned int width, unsigned int height);
-void delete_FrameBuffer(FrameBuffer *frame);
-void FrameBuffer_clear(FrameBuffer *frame, Pixel color);
-void FrameBuffer_line(FrameBuffer *frame, int x1, int y1, int x2, int y2, Pixel color);
-void FrameBuffer_box(FrameBuffer *frame, int x1, int y1, int x2, int y2, Pixel color);
-void FrameBuffer_circle(FrameBuffer *frame, int x1, int y1, int radius, Pixel color);
-int FrameBuffer_writeGIF(FrameBuffer *f, ColorMap *c, char *filename);
-
-/* And some useful constants */
-
-#define BLACK 0
-#define WHITE 1
-#define RED 2
-#define GREEN 3
-#define BLUE 4
-#define YELLOW 5
-#define CYAN 6
-#define MAGENTA 7