Joel,
 
Thanks for the explanation. Thourough and clear.
As for the selection, since for now we don't know wether it's by design or
not, I would say it may not be a good idea to do anything about it.
 
Maybe Rodney did it by design and hundreds of users of Vassal like it this
way. I'm not in a position to ask such things. I just wanted to be sure it
was the same for all of us.
 
As for the patch I'll have a look at it if it's in your branch of the
source: now that I have finally setup all I need to try to do some
programing I won't give up the chance to have a look at what you did ;-) And
who knows, maybe I'll be able to produce a useful widget one day ;-)
 
David ROBERT
[EMAIL PROTECTED]
+33 (0)6 07 22 19 82

 

  _____  

De : [email protected] [mailto:[EMAIL PROTECTED] De
la part de Joel Uckelman
Envoyé : lundi 2 octobre 2006 23:14
À : [email protected]
Objet : Re: [vassalengine] Selecting & Rotating units (Even/Odd sized units)



Thus spake [EMAIL PROTECTED] <mailto:aradiel%40bigfoot.com> com:
> 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. <http://aradiel.free.fr/vassal/rotation.html>
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] <mailto:aradiel%40bigfoot.com> com) 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.


 


[Non-text portions of this message have been removed]



 
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