Mercurial > MadButterfly
comparison Android/java/org/madbutterfly/coord.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 |
comparison
equal
deleted
inserted
replaced
492:e95598916dfb | 493:1b6228092a57 |
---|---|
1 package org.madbutterfly; | |
2 | |
3 import java.util.ArrayList; | |
4 | |
5 class coord { | |
6 protected int addr; | |
7 redraw_man rdman; | |
8 public ArrayList children; | |
9 public ArrayList members; | |
10 | |
11 public coord(redraw_man rdman, int addr) { | |
12 this.addr = addr; | |
13 this.rdman = rdman; | |
14 children = new ArrayList(); | |
15 members = new ArrayList(); | |
16 } | |
17 | |
18 protected void invalid() { | |
19 addr = 0; | |
20 } | |
21 | |
22 protected void finalize() { | |
23 if(addr != 0) | |
24 _jni.rdman_coord_free(rdman._rdman_addr, addr); | |
25 } | |
26 | |
27 public void add_shape(shape member) { | |
28 _jni.rdman_add_shape(rdman._rdman_addr, member.addr, addr); | |
29 members.add(member); | |
30 member.parent = this; | |
31 } | |
32 } |