Refresh();
}
+ private static VectorGraphics.Affine identity = VectorGraphics.Affine.identity();
+
/** runs the prerender() and render() pipelines in the root Box to regenerate the backbuffer, then blits it to the screen */
public synchronized void render() {
if (y+h > root.height) h = root.height - y;
if (w <= 0 || h <= 0) continue;
- root.render(0, 0, x, y, w, h, this);
+ root.render(0, 0, x, y, w, h, this, identity);
if (abort) {
return;
}
}
-
}
// FEATURE: reinstate recycler
- mitre (hard)
- bevel (easy)
- bump (easy, but requires 'round' Paint)
- - subtree sharing? otherwise the memory consumption might be outrageous... clone="" attribute?
+ - subtree sharing? otherwise the memory consumption might be outrageous... clone="" attribute?
- better clipping
- intersect clip regions (linearity)
- clip on trapezoids, not pixels
static final byte TYPE_CUBIC = 3;
static final byte TYPE_QUADRADIC = 4;
+ // FEATURE: make this faster and cache it; also deal with negative coordinates
+ public int boundingBoxWidth() {
+ int ret = 0;
+ for(int i=0; i<numvertices; i++) ret = Math.max(ret, (int)Math.ceil(x[i]));
+ return ret;
+ }
+
+ // FEATURE: make this faster and cache it; also deal with negative coordinates
+ public int boundingBoxHeight() {
+ int ret = 0;
+ for(int i=0; i<numvertices; i++) ret = Math.max(ret, (int)Math.ceil(y[i]));
+ return ret;
+ }
+
/** Creates a concrete vector path transformed through the given matrix. */
public RasterPath realize(Affine a) {