private List createPoints ( int numberOfSegments , float radius , float cx , float cy , float start , float end ) { ArrayList tempPoints = new ArrayList ( ) ; int step = 360 / numberOfSegments ; for ( float a = start ; a <= end + step ; a += step ) { float ang = a ; if ( ang > end ) { ang = end ; } float x = ( float ) ( cx + ( FastTrig . cos ( Math . toRadians ( ang ) ) * radius ) ) ; float y = ( float ) ( cy + ( FastTrig . sin ( Math . toRadians ( ang ) ) * radius ) ) ; tempPoints . add ( new Float ( x ) ) ; tempPoints . add ( new Float ( y ) ) ; } return tempPoints ; }
Generate the points to fill a corner arc .