[transform-swf-updates] Status report for week ending June 18th
Brought to you by:
smackay
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-06-19 10:49:57
|
Progess this week: More generall polishing with most of the effort was spent on getting all the methods and classes documented. API Changes: Corrected getLanguage() / setLanguage() accessor methods on DefineFont2, DefineFont3 and FontInfo2 to use the Language enum rather than ints. Removed getWidth() and getHeight() methods from text and shapes. This was old code left over from an interface definition called Displayable which returned the dimensions of visible objects but was never used. Changed DefineFontName to FontName since it contains information about and font and is not a definition tag. Code Changes: Added the name used by Java to identify a character encoding as an attribute to CharacterEncoding. Updated SWFEncoder / SWFDecoder so setEncoding() uses a CharacterEncoding argument rather than a String. This makes sure only character encodings supported in Flash can be used. Added a DEBUG flag to Constants.java so calls to SWFEncoder methods to verify an object has been encoded correctly can be disabled for production code. Both the methods used to decode and encode objects check the number of bytes encoded matches the expected number - which is an easy way to catch bugs. For decoding the check always remaining in place so badly formed files can be caught. For encoding now the checks can be turned on for development then turned off for releases - giving a small but useful increase in performance. Moved MovieTypes from com.flagstone.transform.coder to com.flagstone.transform. Documentation: Added javadoc comments for all the public methods and constants. Updated the class descriptions. The aim is to keep them simple and provide examples in the cookbook that illustrate better what each class does. Testing: Cleaned up testing of encoder and decoder classes. Planned for next week: More testing with real-world Flash files. Refactoring the font, image and sound decoders to reduce the complexity of the methods. Regards, Stuart -- Flagstone Software Ltd. |