# [NTG-context] rotate bug?

Peter Rolf indiego at gmx.net
Thu Nov 8 14:27:30 CET 2007

Hi,

This morning I used \rotate to correct some slightly sloped graphics and
noticed a weird behavior. In case of the rotation angle interval (-1,0)
the negative sign is simply ignored, so the rotation goes to the
opposite direction.

Donno if negative values for the rotation angle are allowed (they
normally work). But it's easier to handle it this way (sign for
direction of rotation).

@Wolfgang: as workaround, only use positive values or add -360 ;)
(and sorry for my wrong interpretation of your table mail)
@Taco: are you still collecting the ConTeXt bugs?

Best wishes, Peter

\setuplayout[grid=yes]

\starttext
\showgrid

\def\Foobar{\blackrule[width=\textwidth,height=0.5\lineheight]}

\framed{\rotate[rotation=-0.5]{\Foobar}} % -0.x is not working (sign is
ignored)
\snaptogrid\hbox\bgroup
\framed{\rotate[rotation=359.5]{\Foobar}} % ok
\egroup

\snaptogrid\hbox\bgroup
\framed{\rotate[rotation=0.5]{\Foobar}} % ok
\egroup
\snaptogrid\hbox\bgroup
\framed{\rotate[rotation=-359.5]{\Foobar}} % ok
\egroup

\stoptext