private void initBaseCoordsProjection ( ) { baseScreenCoords = new int [ canvas . base . baseCoords . length ] [ 2 ] ; for ( int i = 0 ; i < canvas . base . dimension + 1 ; i ++ ) { double [ ] ratio = baseCoordsScreenProjectionRatio ( canvas . base . baseCoords [ i ] ) ; baseScreenCoords [ i ] [ 0 ] = ( int ) ( canvas . getWidth ( ) * ( canvas . margin + ( 1 - 2 * canvas . margin ) * ratio [ 0 ] ) ) ; baseScreenCoords [ i ] [ 1 ] = ( int ) ( canvas . getHeight ( ) - canvas . getHeight ( ) * ( canvas . margin + ( 1 - 2 * canvas . margin ) * ratio [ 1 ] ) ) ; } }
Initialize base coordinates on Java2D screen .