protected void drawWithOffset(float zone,int pointsRight,int pointsLeft,float fixedPoints,Canvas canvas,Paint paint){
  int position=getPositionForZone(zone);
  int firstPosition=(int)(position - pointsLeft - fixedPoints);
  int lastPosition=(int)(position + pointsRight + fixedPoints);
  if (lastPosition > pointsNumber - 1 && lastPosition != pointsNumber) {
    int offset=lastPosition - pointsNumber - 1;
    float[] pointsF=getArrayFloat(points.subList(0,offset));
    lastPosition=pointsNumber - 1;
    canvas.drawPoints(pointsF,paint);
  }
  if (firstPosition < 0) {
    int offset=Math.abs(firstPosition);
    float[] pointsF=getArrayFloat(points.subList((pointsNumber - 1) - offset,pointsNumber - 1));
    canvas.drawPoints(pointsF,paint);
    firstPosition=0;
  }
  float[] pointsF=getArrayFloat(points.subList(firstPosition,lastPosition));
  canvas.drawPoints(pointsF,paint);
}

protected void drawWithOffset ( float zone , int pointsRight , int pointsLeft , float fixedPoints , Canvas canvas , Paint paint ) { int position = getPositionForZone ( zone ) ; int firstPosition = ( int ) ( position - pointsLeft - fixedPoints ) ; int lastPosition = ( int ) ( position + pointsRight + fixedPoints ) ; if ( lastPosition > pointsNumber - 1 && lastPosition != pointsNumber ) { int offset = lastPosition - pointsNumber - 1 ; float [ ] pointsF = getArrayFloat ( points . subList ( 0 , offset ) ) ; lastPosition = pointsNumber - 1 ; canvas . drawPoints ( pointsF , paint ) ; } if ( firstPosition < 0 ) { int offset = Math . abs ( firstPosition ) ; float [ ] pointsF = getArrayFloat ( points . subList ( ( pointsNumber - 1 ) - offset , pointsNumber - 1 ) ) ; canvas . drawPoints ( pointsF , paint ) ; firstPosition = 0 ; } float [ ] pointsF = getArrayFloat ( points . subList ( firstPosition , lastPosition ) ) ; canvas . drawPoints ( pointsF , paint ) ; }
paint a line with a offset for right and left
