SwingCanvas implements RSCanvas { public void drawLine(int left, float y, int right, float y2, RSPaint gridPaint) { SwingPaint gp = (SwingPaint) gridPaint; g.setColor(gp.color); g.setStroke(gp.stroke); g.drawLine (left, (int)y, right, (int)y2); } SwingCanvas(Component canvas, Graphics g); void drawLine(int left, float y, int right, float y2,
			RSPaint gridPaint); void drawPath(RSPath path, RSPaint strokePaint); void drawRect(int left, int top, int right, int bottom,
			RSPaint paint); RSRect getClipBounds();  }
@Test public void testDrawLine() throws Exception { painter = new Painter() { @Override public void paint(SwingCanvas canvas) { RSRect r = canvas.getClipBounds(); r.left += 20; r.top += 20; r.right -= 20; r.bottom -= 20; int center = (r.bottom - r.top) / 2; RSPaint paint = new SwingPaint(); paint.setStyle(PaintStyle.STROKE); paint.setStrokeWidth(5); paint.setColor(uiLiaison.getRedColor()); canvas.drawLine(r.left, center , r.right, center, paint); } }; uiLiaison.repaint(); Thread.sleep(5000); }