@Override public void draw(GOut g) { Coord dc = new Coord(); for (dc.y = 0; dc.y < sz.y; dc.y += texpap.sz().y) { for (dc.x = 0; dc.x < sz.x; dc.x += texpap.sz().x) { g.image(texpap, dc); } } g.chcolor(); int y = -cury; synchronized (lines) { for (Text line : lines) { int dy1 = sz.y + y; int dy2 = dy1 + line.sz().y; if ((dy2 > 0) && (dy1 < sz.y)) { g.image(line.tex(), new Coord(margin, dy1)); } y += line.sz().y; } } if (maxy > sz.y) { int fx = sz.x - sflarp.sz().x; int cx = fx + (sflarp.sz().x / 2) - (schain.sz().x / 2); for (y = 0; y < sz.y; y += schain.sz().y - 1) { g.image(schain, new Coord(cx, y)); } double a = (double) (cury - sz.y) / (double) (maxy - sz.y); int fy = (int) ((sz.y - sflarp.sz().y) * a); g.image(sflarp, new Coord(fx, fy)); } }
public void draw(GOut g) { g.chcolor(0, 0, 0, 160); if (ctl == null || csz == null) { return; } g.frect(ctl, csz); g.chcolor(); cdraw(g.reclip(xlate(Coord.z, true), asz)); if (cap != null) { topless.draw(g, new Coord(0, th), sz.sub(0, th)); g.image(tleft, Coord.z); Coord tmul = new Coord(tleft.sz().x, tdh); Coord tmbr = new Coord(sz.x - tright.sz().x, th); for (int x = tmul.x; x < tmbr.x; x += tmain.sz().x) { g.image(tmain, new Coord(x, tdh), tmul, tmbr); } g.image(tright, new Coord(sz.x - tright.sz().x, tdh)); g.image(cap.tex(), capc.sub(0, cap.sz().y)); } else { wbox.draw(g, Coord.z, sz); } /* if(cap != null) { GOut cg = og.reclip(new Coord(0, -7), sz.add(0, 7)); int w = cap.tex().sz().x; cg.image(cl, new Coord((sz.x / 2) - (w / 2) - cl.sz().x, 0)); cg.image(cm, new Coord((sz.x / 2) - (w / 2), 0), new Coord(w, cm.sz().y)); cg.image(cr, new Coord((sz.x / 2) + (w / 2), 0)); cg.image(cap.tex(), new Coord((sz.x / 2) - (w / 2), 0)); } */ super.draw(g); }
public void atext(String text, Coord c, double ax, double ay) { Text t = Text.render(text); Tex T = t.tex(); Coord sz = t.sz(); image(T, c.add((int) ((double) sz.x * -ax), (int) ((double) sz.y * -ay))); T.dispose(); checkerr(); }
public void draw(GOut g) { Coord c = new Coord(xoff, 0); for (Spec s : inputs) { GOut sg = g.reclip(c, Inventory.invsq.sz()); sg.image(Inventory.invsq, Coord.z); s.draw(sg); c = c.add(Inventory.sqsz.x, 0); } if (qmod != null) { g.image(qmodl.tex(), new Coord(0, qmy + 4)); c = new Coord(xoff, qmy); int mx = -1; int pw = 0; int vl = 1; for (Indir<Resource> qm : qmod) { try { Tex t = qm.get().layer(Resource.imgc).tex(); g.image(t, c); c = c.add(t.sz().x + 1, 0); if (c.x > mx) mx = c.x; try { Glob.CAttr attr = ui.gui.chrwdg.findattr(qm.get().basename()); if (attr != null) { pw++; vl *= attr.comp; Tex txt = attr.comptex(); g.image(txt, c); c = c.add(txt.sz().x + 8, 0); } } catch (Exception ignored) { } } catch (Loading l) { } } if (pw > 0) { g.image( Text.renderstroked( String.format("Cap: %.0f", Math.floor(Math.pow(vl, 1.0f / pw))), Color.WHITE, Color.BLACK, new Text.Foundry(Text.fraktur, 14).aa(true)) .tex(), new Coord(mx + 30, qmy)); } } c = new Coord(xoff, outy); for (Spec s : outputs) { GOut sg = g.reclip(c, Inventory.invsq.sz()); sg.image(Inventory.invsq, Coord.z); s.draw(sg); c = c.add(Inventory.sqsz.x, 0); } super.draw(g); }
public void draw(GOut g) { g.chcolor(new Color(255, 255, 255, (int) (255 * a))); g.image(pbg, new Coord(3, 3), new Coord(3, 3), sz.add(new Coord(-6, -6))); pbox.draw(g, Coord.z, sz); g.image(text.tex(), sz.div(2).sub(text.sz().div(2))); }
public Tex tex() { return (t.tex()); }