private void map(int seg,double a,double o,Point2D pt){
  double dx=data[seg] - data[seg - 3];
  double dy=data[seg + 1] - data[seg - 2];
  double dl=data[seg + 2] - data[seg - 1];
  double ux=dx / dl;
  double uy=dy / dl;
  a-=data[seg - 1];
  pt.setLocation(data[seg - 3] + a * ux - o * uy,data[seg - 2] + a * uy + o * ux);
}

private void map ( int seg , double a , double o , Point2D pt ) { double dx = data [ seg ] - data [ seg - 3 ] ; double dy = data [ seg + 1 ] - data [ seg - 2 ] ; double dl = data [ seg + 2 ] - data [ seg - 1 ] ; double ux = dx / dl ; double uy = dy / dl ; a -= data [ seg - 1 ] ; pt . setLocation ( data [ seg - 3 ] + a * ux - o * uy , data [ seg - 2 ] + a * uy + o * ux ) ; }
map a location based on the provided segment , returning in pt . seg must be a valid ' lineto ' segment . note : if the path is closed , x must be within the start and end of the path .
