$context = array_slice( $context, count( $context ) - $nlead );
$x0 = $xi - count( $context );
$y0 = $yi - count( $context );
$context = array_slice( $context, count( $context ) - $nlead );
$x0 = $xi - count( $context );
$y0 = $yi - count( $context );