}
private void paintBase(InstancePainter painter, Value pullValue,
Color inColor, Color outColor) {
boolean color = painter.shouldDrawColor();
Direction facing = painter.getAttributeValue(StdAttr.FACING);
Graphics g = painter.getGraphics();
Color baseColor = g.getColor();
GraphicsUtil.switchToWidth(g, 3);
if (color && inColor != null) g.setColor(inColor);
if (facing == Direction.EAST) {
GraphicsUtil.drawText(g, pullValue.toDisplayString(), -32, 0,
GraphicsUtil.H_RIGHT, GraphicsUtil.V_CENTER);
} else if (facing == Direction.WEST) {
GraphicsUtil.drawText(g, pullValue.toDisplayString(), 32, 0,
GraphicsUtil.H_LEFT, GraphicsUtil.V_CENTER);
} else if (facing == Direction.NORTH) {
GraphicsUtil.drawText(g, pullValue.toDisplayString(), 0, 32,
GraphicsUtil.H_CENTER, GraphicsUtil.V_TOP);
} else {
GraphicsUtil.drawText(g, pullValue.toDisplayString(), 0, -32,
GraphicsUtil.H_CENTER, GraphicsUtil.V_BASELINE);
}
double rotate = 0.0;
if (g instanceof Graphics2D) {
rotate = Direction.SOUTH.toRadians() - facing.toRadians();
if (rotate != 0.0) ((Graphics2D) g).rotate(rotate);
}
g.drawLine(0, -30, 0, -26);
g.drawLine(-6, -30, 6, -30);
if (color && outColor != null) g.setColor(outColor);