Hi David,

FreeRotator is the class that implements the 'Can Rotate' trait. The Rotated 
images are created in FreeRotator.getRotatedImage().]

The key piece of code is

        AffineTransform t = 
AffineTransform.getTranslateInstance(-rotatedBounds.x, -rotatedBounds.y);
        t.rotate(-Math.PI * angle / 180.0);
        t.translate(unrotatedBounds.x, unrotatedBounds.y);
        g2d.drawImage(unrotated.getImage(obs), t, obs);

If you need a good Java reference, look at

http://java.sun.com/docs/books/tutorial/
and
http://java.sun.com/j2se/1.4.2/docs/api/index.html


Cheers,
Brent.



>*********** REPLY SEPARATOR ***********
>
>On 30/09/2006 at 1:52 PM [EMAIL PROTECTED] wrote:
>Alright,
>
>The rude guy is trying to investigate the problem by himself as advised :-)
>
>I got Eclipse & SVN installed and VASSAL-src checked out.
>Any idea where I can focus my efforts? Do you know which code portion I
>should try to explore in my search for the faulty odd pixel sized units
>rotation?
>Is RotateFilter.java the right place to look at?
>
>Bear in mind that even if I had basic courses of object oriented programing
>years ago I lack real practice.
>
>Yours,
>
>David ROBERT 
>

____________________________________________________________
Brent Easton                       
Analyst/Programmer                               
University of Western Sydney                                   
Email: [EMAIL PROTECTED]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vassalengine/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/vassalengine/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to