diff Android/java/org/madbutterfly/shape.java @ 493:1b6228092a57 Android_Skia

Java code for MadButterfly JNI. This is Java code that access MadButterfly JNI interface.
author Thinker K.F. Li <thinker@branda.to>
date Thu, 26 Nov 2009 15:02:51 +0800
parents
children 2d7df44e6299
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Android/java/org/madbutterfly/shape.java	Thu Nov 26 15:02:51 2009 +0800
@@ -0,0 +1,24 @@
+package org.madbutterfly;
+
+class shape {
+    protected int addr;
+    redraw_man rdman;
+    protected coord parent;
+    protected paint stroke, fill;
+
+    public shape(redraw_man rdman, int addr) {
+	this.addr = addr;
+	this.rdman = rdman;
+	this.parent = null;
+	stroke = fill = null;
+    }
+    
+    protected void invalid() {
+	addr = 0;
+    }
+    
+    protected void finalize() {
+	if(addr != 0)
+	    _jni.rdman_shape_free(rdman._rdman_addr, addr);
+    }
+}