"Aaron Ardiri" <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED]
???...
> > > > does anyone know how to draw text with different slope/angles
> > > > (e.g. 30, 45, 90 degrees) ?
> > > > thx!
> > >
> > > implement your own rotation algorithm... or, wait until PalmOS
> > > catches up to every other platform with providing graphic context
> > > support (and, stuff like this), in Palm OS6 :)
> >
> > many map programs display/draw street names according to the slope of
their
> > street lines, but I have no idea how to do that
>
> google for rotation transformation matrix.
>
> http://kwon3d.com/theory/transform/transform.html
> http://kwon3d.com/theory/transform/rot.html
>
> draw it to an offscreen window - then, apply a rotation. then
> overlay onto the 'final' display :) done. doesn't take much to
> code up :) to save you doing a lot of digging/math - here is the
> basic algorithm
>
> void
> rotate(x,y,*_x,*_y,angle)
> {
>   *x = ( cos(angle) * x) + (sin(angle) * y);
>   *y = (-sin(angle) * x) + (cos(angle) * y);
> }

I don't really understand the above algorithm
x & y are the original coordinates ?
so what do  *_x  &  *_y  mean? why they are not included in :
*x = ( cos(angle) * x) + (sin(angle) * y);
*y = (-sin(angle) * x) + (cos(angle) * y);
?
and  *x  & *y  are the new coordinates ?
I'm quite confused


>
> basic trigonometry :) piece of cake - now, to make it fast
> you can use integer math instead of using 'cos' and 'sin'
> functions (= slow). Mathlib can help there if needed.
>
> ---
> Aaron Ardiri
> [EMAIL PROTECTED]
> http://www.mobilewizardry.com/members/aaron_ardiri.php [profile]
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to