private static final int SPINE_DOT = Wire.WIDTH + 4;
static void drawLines(ComponentDrawContext context,
SplitterAttributes attrs, Location origin) {
boolean showState = context.getShowState();
CircuitState state = showState ? context.getCircuitState() : null;
if (state == null) showState = false;
SplitterParameters parms = attrs.getParameters();
int x0 = origin.getX();
int y0 = origin.getY();
int x = x0 + parms.getEnd0X();
int y = y0 + parms.getEnd0Y();
int dx = parms.getEndToEndDeltaX();
int dy = parms.getEndToEndDeltaY();
int dxEndSpine = parms.getEndToSpineDeltaX();
int dyEndSpine = parms.getEndToSpineDeltaY();
Graphics g = context.getGraphics();
Color oldColor = g.getColor();
GraphicsUtil.switchToWidth(g, Wire.WIDTH);
for (int i = 0, n = attrs.fanout; i < n; i++) {
if (showState) {
Value val = state.getValue(Location.create(x, y));
g.setColor(val.getColor());
}
g.drawLine(x, y, x + dxEndSpine, y + dyEndSpine);
x += dx;
y += dy;