List of utility methods to do Graphics Draw Curve
void | drawBevel(Graphics g, Rectangle r) Uses translucent shades of white and black to draw highlights and shadows around a rectangle, and then frames the rectangle with a shade of gray (120). drawColors(blacks, g, r.x, r.y + r.height, r.x + r.width, r.y + r.height, SwingConstants.SOUTH);
drawColors(blacks, g, r.x + r.width, r.y, r.x + r.width, r.y + r.height, SwingConstants.EAST);
drawColors(whites, g, r.x, r.y, r.x + r.width, r.y, SwingConstants.NORTH);
drawColors(whites, g, r.x, r.y, r.x, r.y + r.height, SwingConstants.WEST);
g.setColor(new Color(120, 120, 120));
g.drawRect(r.x, r.y, r.width, r.height);
|
void | drawBevel(Graphics2D g, Rectangle r) Uses translucent shades of white and black to draw highlights and shadows around a rectangle, and then frames the rectangle with a shade of gray (120). g.setStroke(new BasicStroke(1)); drawColors(blacks, g, r.x, r.y + r.height, r.x + r.width, r.y + r.height, SwingConstants.SOUTH); drawColors(blacks, g, r.x + r.width, r.y, r.x + r.width, r.y + r.height, SwingConstants.EAST); drawColors(whites, g, r.x, r.y, r.x + r.width, r.y, SwingConstants.NORTH); drawColors(whites, g, r.x, r.y, r.x, r.y + r.height, SwingConstants.WEST); g.setColor(new Color(120, 120, 120)); g.drawRect(r.x, r.y, r.width, r.height); |
void | drawBevel(Graphics2D g, Rectangle r) Uses translucent shades of white and black to draw highlights and shadows around a rectangle, and then frames the rectangle with a shade of gray (120). g.setStroke(new BasicStroke(1)); drawColors(blacks, g, r.x, r.y + r.height, r.x + r.width, r.y + r.height, SwingConstants.SOUTH); drawColors(blacks, g, r.x + r.width, r.y, r.x + r.width, r.y + r.height, SwingConstants.EAST); drawColors(whites, g, r.x, r.y, r.x + r.width, r.y, SwingConstants.NORTH); drawColors(whites, g, r.x, r.y, r.x, r.y + r.height, SwingConstants.WEST); g.setColor(new Color(120, 120, 120)); g.drawRect(r.x, r.y, r.width, r.height); |
void | drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) draw Bezel Color oldColor = g.getColor(); if (isPressed) { if (isDefault) { g.setColor(darkShadow); g.drawRect(0, 0, w - 1, h - 1); g.setColor(shadow); g.drawRect(1, 1, w - 3, h - 3); ... |
void | drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) draw Bezel Color oldColor = g.getColor(); g.translate(x, y); if (isPressed && isDefault) { g.setColor(darkShadow); g.drawRect(0, 0, w - 1, h - 1); g.setColor(shadow); g.drawRect(1, 1, w - 3, h - 3); } else if (isPressed) { ... |
void | drawBezel(Graphics g, int x, int y, int width, int height, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) Draws a border that is suitable for buttons of the Basic look and feel. Color oldColor = g.getColor(); try { if ((isPressed == false) && (isDefault == false)) { drawEtchedRect(g, x, y, width, height, lightHighlight, highlight, shadow, darkShadow); if ((isPressed == true) && (isDefault == false)) { g.setColor(shadow); g.drawRect(x + 1, y + 1, width - 2, height - 2); ... |
void | drawCurve(Graphics2D g, Point p1, Point p2) draws a nice looking curve between the two given points int count = (int) Math.pow(Math.hypot(p1.x - p2.x, p1.y - p2.y) * 1.3, 0.5); if (count < 1) { count = 1; for (int i = 0; i < count; i++) { float factor = i / (float) count; float factor2 = (i + 1) / (float) count; Point d1 = interpol(p1, p2, factor); ... |
GeneralPath | drawQuadCurve(AffineTransform affine, Vector draw Quad Curve if (affine == null) { affine = new AffineTransform(); affine.setToIdentity(); boolean drawPath = true; if (g == null) drawPath = false; int pixelSize = 1; ... |