GMAO Bugfix: Text rotation and Vertical Justification

Information about GMAO - the application I (write and) use to translate manga.

Moderator: FuguTabetai

Post Reply
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

GMAO Bugfix: Text rotation and Vertical Justification

Post by FuguTabetai »

Just fixed two bugs in GMAO:

Text can now be rotated at 90 and 270 degrees. Before, when you got it perfectly at 90 degrees, it would snap back down to no rotation (division by zero, needed to make a special case...) So that works now, but sometimes, right on the boundary it will flip the text the other direction. I can't fix this really; but if you just go a bit more, it will hit the 90 or 270 degree area, and you'll be set.

The other bug was in Vertical text Justification. GMAO would save the justification out just fine, but then wouldn't read it back in. I fixed that, so now it can read in the vertical text justification that it saved out.

I'm going to look quickly at the ovals turning into wierd polygons thing right now, but that has been really, really hard to track down. I do know that rectangles and polygons will never go funky though. So you can just avoid the oval, but that kind of sucks because ovals are really useful in many text bubbles...

fugu
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

Notes on the Oval changing to Polygon problems:

If you draw a circle, then move it, and select the polygon tool and save, it will turn into a polygon. I don't know if an Oval will change into a polygon if it is moved but the polygon tool is not selected.
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

Yep, if you draw an oval, and then move it, it will change into a poly. Ok, now I'll start looking around at the code...
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

I've fixed this bug finally. It took a while to track down, but when moving, all I do is create an AffineTransform with the offset, and then use AffineTransform.createTransformedShape() to move the bugger. The problem is that the method call would always return a GeneralPath object (although it probably uses higher order polygons or bezier curves to preserve the shape, when I use GeneralPaths I just use single order lineTo calls) so after a move, ALL OBJECTS would turn into GeneralPath Polygons. I made a really hacky fix to just re-create the correct object type (Ellispe2D.Double, Rectangle2D.Double) if it wasn't a Polygon, and use the new thing if it was.

Anyway, so that bug should be fixed now.

Other things I want to take care of in the future:

Probably should have a "Replace existing file?" Dialoge box when you save if there is an existing file. Right now, GMAO will happily try to overwrite anything...

otherwise, I've got some major bugs fixed today! yay!

fugu
Post Reply