Thus spake [EMAIL PROTECTED]:
> I'm still investigating the issue I raised previously (or more precisely I
> trying to investigate it). I also noticed something about the way Vassal is
> drawing the border for selected units.
>
> I just want your input about it. I wrote a small webpage
> (http://aradiel.free.fr/vassal/rotation.html) with screen captures about the
> point I raised (pictures are worth tons of words). I also made available the
> mini module I used to test this if you are willing to check wether you
> notice the same thing I did.
>
> If you have the time, to do the test, I'm willing to hear from you. No need
> to send you answer to the mailing list. Mail me directly
> ([EMAIL PROTECTED]) then I'll post here the results. In the meantime, I'm
> back to my eclipse workspace trying to figure out why Vassal behaves this
> way ;-)
> David ROBERT
>
You've documented the problem quite thoroughly. Thank you!
Here's what's causing it:
Affine transformations (like rotation) operate on points. Pixels are not
points; pixels have size. Screen coordinates associate pixels with the
points which are their upper-left corners. This has the effect that the
point which is at a pixel's coordinates is not the same as the point which
is the center of a pixel---the pixel center is offset from the point at
the pixel's coordinates by a half-pixel along both axes.
When you rotate a 2x2 square of pixels, the center of the square falls
at (1,1), which happens to be the upper left corner of the pixel in the
lower-right. When you rotate a 3x3 square of pixels, the center of the
squre falls at (1.5,1.5), in the center of the middle pixel. The
FreeRotator ignores the half-pixel offset and instead always rotates
about the upper-left corner of the pixel nearest to the true center, hence
the wobble you see on tokens with an odd dimension.
I've put together something which fixes the symptoms, but FreeRotator
could stand some clean-up and I won't have a good idea of whether I've
also corrected the underlying problem until I do the clean-up. Expect
the (real) fix in the next release. If you want it before then, I can
send you a patch of what I have now.
As for the selection indicator: I'm not sure what the expected behavior
is. Is the way it is now---drawing over the uppermost row and leftmost
column of the piece, but one row past the right edge and one row below the
bottom---correct? Or should it be uniformly outset/inset from the edge one
pixel?
--
J.
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/