SwingCanvas implements RSCanvas { public void drawPath(RSPath path, RSPaint strokePaint) { SwingPaint p = (SwingPaint) strokePaint; SwingPath pth = (SwingPath) path; g.setColor(p.color); g.setStroke(p.stroke); g.draw(pth); } 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 testDrawPath() throws Exception { final RSPath path = new SwingPath(); RSRect r = canvas.getClipBounds(); path.moveTo(20, 20); path.lineTo(r.right - 20, 20); path.lineTo(r.right - 20, r.bottom - 20); path.moveTo(20, r.bottom - 20); path.lineTo(20, 20); final RSPaint paint = new SwingPaint(); paint.setStyle(PaintStyle.STROKE); paint.setStrokeWidth(5); paint.setColor(uiLiaison.getRedColor()); painter = new Painter() { @Override public void paint(SwingCanvas canvas) { canvas.drawPath(path, paint); } }; uiLiaison.repaint(); Thread.sleep(5000); }