void paintStrokes(Rectangle r,Graphics g,int axis,int[] lengthPattern,Color[] colorPattern){
  boolean xAxis=(axis == View.X_AXIS);
  int start=0;
  int end=(xAxis ? r.width : r.height);
  while (start < end) {
    for (int i=0; i < lengthPattern.length; i++) {
      if (start >= end) {
        break;
      }
      int length=lengthPattern[i];
      Color c=colorPattern[i];
      if (c != null) {
        int x=r.x + (xAxis ? start : 0);
        int y=r.y + (xAxis ? 0 : start);
        int width=xAxis ? length : r.width;
        int height=xAxis ? r.height : length;
        g.setColor(c);
        g.fillRect(x,y,width,height);
      }
      start+=length;
    }
  }
}

void paintStrokes ( Rectangle r , Graphics g , int axis , int [ ] lengthPattern , Color [ ] colorPattern ) { boolean xAxis = ( axis == View . X_AXIS ) ; int start = 0 ; int end = ( xAxis ? r . width : r . height ) ; while ( start < end ) { for ( int i = 0 ; i < lengthPattern . length ; i ++ ) { if ( start >= end ) { break ; } int length = lengthPattern [ i ] ; Color c = colorPattern [ i ] ; if ( c != null ) { int x = r . x + ( xAxis ? start : 0 ) ; int y = r . y + ( xAxis ? 0 : start ) ; int width = xAxis ? length : r . width ; int height = xAxis ? r . height : length ; g . setColor ( c ) ; g . fillRect ( x , y , width , height ) ; } start += length ; } } }
paint strokes repeatedly using the given length and color patterns .
