Page 1 of 1

New (Text Rotation) Feature: constrain to 45 degree angles

Posted: Mon Mar 01, 2004 3:49 pm
by FuguTabetai
New feature added when rotating text: hold down shift while rotating and the text will snap to 45 degree angles.

I also finally fixed the problem with text at 90 and 270 degrees - they are in the same orientation that you would expect given the rotation.

Note: There is still a strange bug where right around (slightly before or after) the text will jump around 180 degrees to what you would expect it to be. I don't know why this happens - I believe that Java 2D is mis-behaving because I tell it the proper angle, but it freaks out. But honestly I could be in the wrong here too. Still, it isn't much of a problem because the 45 degree angels work right, and with the shift key you can easily peg the text to one of the straight angles.

Note to self: Looks like there is a background-coloring bug in the rotating code where the rectangle background for the text is rotated waaay off center. I need to look into this. (Why haven't I noticed it when rotating before? It is evident on page 8 on Kagome Kagome 1 when rotating the chapter titles.)

Another text drawing bug: when using the TextLayout objects to draw text, they do not support alpha transparency. I should make them support it - either subclass the code, or find a workaround. I should also add better support to doing word-by-word layout using TextLayouts so I can always use TextLayouts and get Styled Text in the bubbles. But that is pretty ambitious.