if ($a <= $ca1 || $a >= $ca4) {
                    $yt = $pos - $w * $y / $x;
                    $xt = $xright + $margin;
                    if ($rot90) {
                        $ha = 'center';