annotate 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
rev   line source
493
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
1 package org.madbutterfly;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
2
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3 class shape {
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
4 protected int addr;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
5 redraw_man rdman;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
6 protected coord parent;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
7 protected paint stroke, fill;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
9 public shape(redraw_man rdman, int addr) {
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
10 this.addr = addr;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
11 this.rdman = rdman;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
12 this.parent = null;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
13 stroke = fill = null;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14 }
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
15
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
16 protected void invalid() {
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
17 addr = 0;
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
18 }
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
19
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
20 protected void finalize() {
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
21 if(addr != 0)
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
22 _jni.rdman_shape_free(rdman._rdman_addr, addr);
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
23 }
1b6228092a57 Java code for MadButterfly JNI.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
24 }