view Android/java/org/madbutterfly/shape.java @ 1395:a768d74e5f49

Fix the svg:use. For a svg:use, it is a group which include the content it reference. It means that we can not tween it to its origin object directly. Instead, we need to ungroup it and then use the result matrix to generate the tweened transformation matrix. Therefore, we need to concate its matrix to the referenced object. Ad center object when the bbox-x is not available.
author wycc
date Sat, 02 Apr 2011 05:36:36 +0800
parents c468e397614d
children
line wrap: on
line source

package org.madbutterfly;

public 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);
    }

    public void set_stroke_width(float w) {
	_jni.sh_set_stroke_width(addr, w);
    }
}