added java support in the GIFPlot example
some minor changes where needed in the interface file git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@331 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
85819c812c
commit
c28fa00d6a
9 changed files with 488 additions and 0 deletions
22
Examples/GIFPlot/Java/shadow.java
Normal file
22
Examples/GIFPlot/Java/shadow.java
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import gifplot;
|
||||
|
||||
public class shadow {
|
||||
|
||||
static {
|
||||
System.loadLibrary("jgifplot");
|
||||
}
|
||||
|
||||
public static void main(String argv[]) {
|
||||
FrameBuffer fb = new FrameBuffer(300, 300);
|
||||
ColorMap cm = new ColorMap("cmap");
|
||||
|
||||
fb.clear(gifplot.BLACK);
|
||||
fb.drawstring(50, 50, gifplot.WHITE, gifplot.BLACK, "Hello world", gifplot.VERTICAL);
|
||||
fb.solidbox(200, 200, 220, 240, gifplot.BLUE);
|
||||
fb.line(0, 290, 293, 50, gifplot.RED);
|
||||
fb.circle(100, 100, 10, gifplot.YELLOW);
|
||||
fb.writeGIF(cm, "plot.gif");
|
||||
|
||||
System.out.println("Image written to 'plot.gif'");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue