public void lineDot(final int x0,final int y0,final int x1,final int y1,final int radius,final int padding,final long lineColor,final long dotColor){
  final double dx=x1 - x0;
  final double dy=y1 - y0;
  final double angle=Math.atan2(dy,dx);
  final double d=Math.sqrt((dx * dx + dy * dy));
  final double ddotcenter=d - radius - padding;
  final double ddotborder=ddotcenter - radius;
  final double xn=Math.cos(angle);
  final double yn=Math.sin(angle);
  final int x2=x0 + ((int)(ddotcenter * xn));
  final int y2=y0 + ((int)(ddotcenter * yn));
  final int x3=x0 + ((int)(ddotborder * xn));
  final int y3=y0 + ((int)(ddotborder * yn));
  setColor(lineColor);
  line(x0,y0,x3,y3,100);
  setColor(dotColor);
  dot(x2,y2,radius,true,100);
}

public void lineDot ( final int x0 , final int y0 , final int x1 , final int y1 , final int radius , final int padding , final long lineColor , final long dotColor ) { final double dx = x1 - x0 ; final double dy = y1 - y0 ; final double angle = Math . atan2 ( dy , dx ) ; final double d = Math . sqrt ( ( dx * dx + dy * dy ) ) ; final double ddotcenter = d - radius - padding ; final double ddotborder = ddotcenter - radius ; final double xn = Math . cos ( angle ) ; final double yn = Math . sin ( angle ) ; final int x2 = x0 + ( ( int ) ( ddotcenter * xn ) ) ; final int y2 = y0 + ( ( int ) ( ddotcenter * yn ) ) ; final int x3 = x0 + ( ( int ) ( ddotborder * xn ) ) ; final int y3 = y0 + ( ( int ) ( ddotborder * yn ) ) ; setColor ( lineColor ) ; line ( x0 , y0 , x3 , y3 , 100 ) ; setColor ( dotColor ) ; dot ( x2 , y2 , radius , true , 100 ) ; }
draw a line with a dot at the end
