[kde-edu]: Need help with this code
Albert Astals Cid
aacid at kde.org
Mon Jul 11 19:17:27 CEST 2005
Well, he really needs to rotate before translating, but that means puting the
rotate line after the translate one due to mathematical things, that is,
rotations and translations are done with matrix multiplications and the fact
that matrix multiplications are done ¿right to left? meants you ahve to put
them in the inverse order you want them to be applied.
Albert
A Dilluns 11 Juliol 2005 19:12, Kevin Krammer va escriure:
> On Monday 11 July 2005 16:02, Carsten Niehaus wrote:
> > I am drawing a vertical line and then want to put a string below that
> > line....
> >
> > · · p->drawLine( x,0,x, m_realHeight );
> > · · p->save();
> > · · p->rotate( -90.0 );
> > · · p->translate( m_realHeight,0 );
>
> You have to translate before you rotate.
>
> See attached exampe.
>
> Cheers,
> Kevin
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
More information about the kde-edu
mailing list