view Android/java/org/madbutterfly/coord.java @ 516:0d9f1f4d3154 Android_Skia

set stroke width for a shape. It also modify procedure of creating a redraw_man.
author Thinker K.F. Li <thinker@branda.to>
date Tue, 01 Dec 2009 22:55:27 +0800
parents c468e397614d
children
line wrap: on
line source

package org.madbutterfly;

import java.util.ArrayList;

public class coord {
    protected int addr;
    redraw_man rdman;
    public ArrayList children;
    public ArrayList members;

    public coord(redraw_man rdman, int addr) {
	this.addr = addr;
	this.rdman = rdman;
	children = new ArrayList();
	members = new ArrayList();
    }

    protected void invalid() {
	addr = 0;
    }

    protected void finalize() {
	if(addr != 0)
	    _jni.rdman_coord_free(rdman._rdman_addr, addr);
    }

    public void add_shape(shape member) {
	_jni.rdman_add_shape(rdman._rdman_addr, member.addr, addr);
	members.add(member);
	member.parent = this;
	_jni.rdman_coord_changed(rdman._rdman_addr, addr);
	_jni.rdman_shape_changed(rdman._rdman_addr, member.addr);
    }
}