private ArrayList transform ( ArrayList pts , Transform t ) { float [ ] in = new float [ pts . size ( ) * 2 ] ; float [ ] out = new float [ pts . size ( ) * 2 ] ; for ( int i = 0 ; i < pts . size ( ) ; i ++ ) { in [ i * 2 ] = ( ( float [ ] ) pts . get ( i ) ) [ 0 ] ; in [ ( i * 2 ) + 1 ] = ( ( float [ ] ) pts . get ( i ) ) [ 1 ] ; } t . transform ( in , 0 , out , 0 , pts . size ( ) ) ; ArrayList outList = new ArrayList ( ) ; for ( int i = 0 ; i < pts . size ( ) ; i ++ ) { outList . add ( new float [ ] { out [ ( i * 2 ) ] , out [ ( i * 2 ) + 1 ] } ) ; } return outList ; }
Transform a list of points