- a = a.copy().premultiply(transform);
-
- // FIXME: clipping
- if (path == null) {
- if (((fillcolor & 0xFF000000) != 0x00000000 || parent == null)) {
- if (OPTIMIZE && a.doesNotRotate()) {
- int x = (int)a.multiply_px(0, 0);
- int y = (int)a.multiply_py(0, 0);
- int x2 = (int)a.multiply_px(contentwidth, contentheight);
- int y2 = (int)a.multiply_py(contentwidth, contentheight);
- buf.fillTrapezoid(x, x, y, x2, x2, y2, (fillcolor & 0xFF000000) == 0 ? 0xffffffff : fillcolor);
- } else {
- new Polygon().addrect(0, 0, contentwidth, contentheight, a).fill(buf, new Paint.SingleColorPaint(fillcolor));
- }
+ a = a.copy().multiply(transform);
+ clipa = clipa.copy().multiply(transform);
+
+ if (mesh == null)
+ if (path != null) mesh = new Mesh(path, true);
+ else {
+ if (((fillcolor & 0xFF000000) != 0x00000000 || parent == null) && (text==null||"".equals(text)))
+ mesh = new Mesh().addRect(0, 0, contentwidth, contentheight);
+ // long ret = font.rasterizeGlyphs(text, buf, a, null, 0x777777, 0);
+ // minwidth = maxwidth = font.textwidth(text);
+ // minheight = maxheight = font.textwidth(text);
+ // if (ret == 0) Platform.Scheduler.add(this);
+ // FIXME: texture