public void popMatrix() { intf.app.popMatrix(); }
applet.rotate(HALF_PI); applet.text(Integer.toString((int) pValue), 0, 0 + labelSize / 2 - 2); applet.popMatrix(); applet.rotate(HALF_PI); applet.text(String.format(lFormat, (int) vMax), 0, 0); applet.popMatrix(); applet.pushMatrix(); applet.textAlign(PConstants.LEFT); applet.rotate(HALF_PI); applet.text(String.format(lFormat, (int) vMin), 0, 0); applet.popMatrix();
@Override void displayText() { String lFormat = "%d"; if (displayLabel) { applet.fill(labelColor); applet.textSize(labelSize); applet.textAlign(PConstants.CENTER); applet.pushMatrix(); applet.translate(pX + pH / 2, pY + pW / 2); applet.rotate(HALF_PI); applet.text(Integer.toString((int) pValue), 0, 0 + labelSize / 2 - 2); applet.popMatrix(); } if (displayValue) { applet.textSize(numberSize); applet.fill(numbersColor); applet.pushMatrix(); applet.textAlign(PConstants.RIGHT); applet.translate(pX - numberSize / 2, pY); applet.rotate(HALF_PI); applet.text(String.format(lFormat, (int) vMax), 0, 0); applet.popMatrix(); applet.pushMatrix(); applet.textAlign(PConstants.LEFT); applet.translate(pX - numberSize / 2, pY + pW); applet.rotate(HALF_PI); applet.text(String.format(lFormat, (int) vMin), 0, 0); applet.popMatrix(); } }
applet.rotate(HALF_PI); applet.text(Integer.toString((int) pValue), 0, 0 + labelSize / 2 - 2); applet.popMatrix(); applet.rotate(HALF_PI); applet.text(String.format(lFormat, (int) vMax), 0, 0); applet.popMatrix(); applet.pushMatrix(); applet.textAlign(PConstants.LEFT); applet.rotate(HALF_PI); applet.text(String.format(lFormat, (int) vMin), 0, 0); applet.popMatrix();
final protected void drawChildren() { for (Widget child: children) { if (child.clipBounds) child.setClip(); intf.app.pushMatrix(); child.setOrigin(); boolean canDraw = child.visible() && child.canDraw(); if (canDraw) { intf.addDrawn(child); child.draw(); } // Even tough the parent is not visible, the children could be // outside of it and so still be visible. child.drawChildren(); if (canDraw) { // So the parent can draw on top of children if needed. child.postDraw(); } intf.app.popMatrix(); if (child.clipBounds) child.unsetClip(); } }