2004-06-07

    * Released Build 1.

2004-06-24

    * Updated to provide portability across compilers by changing all classes to interfaces:

        Replaced constructors with global "C" functions as factories.
        Changed all methods to virtual.
        Standardized method calling convention on WIN32 to __stdcall.
        Status codes are returned rather than throwing exceptions.
        Renamed methods to avoid overloading.
        Memory allocation now respects the library boundary.
        Objects generated by the library classes are returned as pointers.
        Objects passed as arguments are replaced by simple data types wherever possible.
        
    * Removed the typedef unsigned char byte as it was not used often enough to provide 
      any significant savings and would almost certainly class with similar definitions.
        

    * TransformUtil.h: added enumeration containing the status codes returned by methods.

    * FSCodec:

        1. Removed constructors:

            FSCodec(ByteOrder order, const char* filename) throw (FSFileOpenException, FSAccessException);
            FSCodec(ByteOrder order, const byte* bytes, size_t size);
            FSCodec(ByteOrder order, size_t size);

        and replaced them with C factory functions:

            extern "C" FSCodec* CALL Codec(FSCodec::ByteOrder order);
            extern "C" FSCodec* CALL CodecWithSize(FSCodec::ByteOrder order, size_t size);


        2. Memory allocation respects library boundary.

            byte* getData(size_t & size);

        is replaced by:

            size_t CALL getDataSize();
            size_t CALL getData(unsigned char* bytes);

        3. Methods to initialize an object:

            void setData(const byte* bytes, size_t size);
            void setData(ByteOrder order, const byte* bytes, size_t size);

        are replaced by:

            int CALL setDataFromFile(const char* filename);
            void CALL setData(const unsigned char* bytes, size_t size);

     * FSImageConstructor:


         1. Removed constructors:

            FSImageConstructor();
            FSImageConstructor(const char* filename) throw (FSFileOpenException, FSAccessException, FSFormatException);
            FSImageConstructor(const byte* bytes, size_t size) throw (FSFormatException);

        and replaced them with a C factory function:

            extern "C" FSImageConstructor* ImageConstructor();

        2. Memory allocation respects library boundary.

            byte* getColorTable(size_t& size);
            byte* getIndexedImage();
            byte* getColorImage();
            byte* getJPEGImage(size_t& size);

        is replaced by:

            size_t CALL getColorTableSize();
            size_t CALL getColorTable(unsigned char* buffer);

            size_t CALL getIndexedImage(unsigned char* buffer);
            size_t CALL getColorImage(unsigned char* buffer);

            size_t CALL getJPEGImageSize() = 0;
            size_t CALL getJPEGImage(unsigned char* buffer) = 0;

        3. Methods to initialize an object:

            void setImage(const char* filename) throw (FSFileOpenException, FSAccessException, FSFormatException);
            void setImage(const byte* bytes, size_t size) throw (FSFormatException);

        are replaced by:
            
            int CALL setImageFromFile(const char* filename);
            int CALL setImage(const unsigned char* bytes, size_t size);

        Both methods return a status code, Either TransformUtil::OK, TransformUtil::FileNotFound, 
        TransformUtil::ReadError or TransformUtil::FormatError rathe than throwing exceptions.

        4. Changed

            FSDefineShape3* defineEnclosingShape(int, int, int, int, FSSolidLine&);

        to 

            FSDefineShape3* CALL defineShape(int, int, int, int, int borderWidth, int borderColor[]);

        where the reference to the FSSOlidLine object is replaced by its attributes: an int containing
        the width of the line drawn for the border of the shape - measured in twips and an array of 4
        ints containing the values for the red, green, blue and alpha colour channels respectively.

    * FSShapeConstructor

        1. Removed constructors:

            FSShapeConstructor();

        and replaced it with a C factory function:

            extern "C" FSShapeConstructor* ShapeConstructor();

        2. Removed accessor methods for the line and fill styles arrays:

            FSVector<FSLineStyle*> getLineStyles();
            void setLineStyles(const FSVector<FSLineStyle*>& anArray);

            FSVector<FSFillStyle*> getFillStyles();
            void setFillStyles(const FSVector<FSFillStyle*>& anArray);

        The arrays complicate the interface and reference copies can be easily maintained
        outside of the shape constructor. If multiple atyle arrays need to be generated then
        instances of the shape constructor can be generated for each set fo styles.

        3. Renamed methods to avoid overloading and replaced references with pointers:

            void add(const FSFillStyle& aFillStyle);
            void set(int index, const FSLineStyle& aLineStyle);

            void add(const FSFillStyle& aFillStyle);
            void set(int index, const FSFillStyle& aFillStyle);

        were replaced by:

            void CALL addLineStyle(FSLineStyle* aLineStyle);
            void CALL setLineStyle(int index, FSLineStyle* aLineStyle);

            void CALL setFillStyle(int index, FSFillStyle* aFillStyle);
            void CALL addFillStyle(FSFillStyle* aFillStyle);


        4. Removed:

            void selectStyle(int lineIndex, int fillIndex);

        Setting the styles is now handled by:

            void selectStyle(int lineIndex, int fillIndex, int altIndex);

        A style may be left unset/unchanged if the index is set to -1.

        5. Removed:

            FSBounds bounds();
            FSShape shape();

        These objects may be generated using the defineShape() method.


        6. Replaced: 

           FSDefineShape2* defineShape(int identifier);
           FSDefineShape3* defineTransparentShape(int identifier);

        with

           FSDefineShape3* CALL defineShape(int identifier) = 0;

        The cost is a slight increase in object size since the alpha channels for any colours contained
        in the line of fill styles is also encoded whether the object is transparent.


    * FSSoundConstructor:


        1. Removed constructors:

            FSSoundConstructor();
            FSSoundConstructor(const char* filename) throw (FSFileOpenException, FSAccessException, FSFormatException);
            FSSoundConstructor(const byte* bytes, size_t size) throw (FSFormatException);

        and replaced them with a C factory function:

            extern "C" FSSoundConstructor* SoundConstructor();

        2. Memory allocation respects library boundary.

            byte* getSound(size_t& size);

        is replaced by:

            size_t CALL getSoundSize();
            size_t CALL getSound(unsigned char* buffer);

        3. Methods to initialize an object:

            void setSound(const char* filename) throw (FSFileOpenException, FSAccessException, FSFormatException);
            void setSound(const byte* bytes, size_t size) throw (FSFormatException);

        are replaced by:
            
            int CALL setSoundFromFile(const char* filename);
            int CALL setSound(const unsigned char* bytes, size_t size);

         Both methods return a status code, Either TransformUtil::OK, TransformUtil::FileNotFound, 
         TransformUtil::ReadError or TransformUtil::FormatError rathe than throwing exceptions.

    * FSTextConstructor:

        1. Fixed bug where exclamation marks were being displayed instead of spaces.
        2. Fixed bug where 'spaces' were being added to the start of a string.

        3. Removed constructors:

           FSTextConstructor();
           FSTextConstructor(const char* filename) throw (FSFileOpenException, FSAccessException, FSFormatException);
           FSTextConstructor(const byte* bytes, size_t size) throw (FSFormatException);

        and replaced them with a C factory function:

           extern "C" FSTextConstructor* TextConstructor();

        4. Methods to initialize an object:

           void setFont(const char* filename) throw (FSFileOpenException, FSAccessException, FSFormatException);
           void setFont(const byte* bytes, size_t size) throw (FSFormatException);

        are replaced by:
            
           int CALL setFontFromFile(const char* filename);
           int CALL setFont(const unsigned char* bytes, size_t size);

        Both methods return a status code, Either TransformUtil::OK, TransformUtil::FileNotFound, 
        TransformUtil::ReadError or TransformUtil::FormatError rathe than throwing exceptions.

        5. Objects passed as arguments are replaced by simple data types:

            void setColor(const FSColor& textColor)

        is replaced by:

            void CALL setColor(int color[])

        where the reference to the FSColorobject is replaced by an array of 4 integers containing the 
        values for the red, green, blue and alpha colour channels respectively.

        6. Renamed methods to avoid overloading:

            FSDefineText2* defineText(int anIdentifier, const char* text);
            FSDefineText2* defineText(int anIdentifier, const char* lines[], size_t count, int lineSpacing);
            FSDefineText2* defineText(int anIdentifier, const wchar_t* text);
            FSDefineText2* defineText(int anIdentifier, const wchar_t* lines[], size_t count, int lineSpacing);
 
            FSBounds boundsForText(const char* text);
            FSBounds boundsForText(const wchar_t* text);

        were renamed, respectively, to:
            
            FSDefineText2* CALL defineText(int anIdentifier, const char* text);
            FSDefineText2* CALL defineTextBlock(int anIdentifier, const char* lines[], size_t count, int lineSpacing);
            FSDefineText2* CALL defineWideText(int anIdentifier, const wchar_t* text);
            FSDefineText2* CALL defineWideTextBlock(int anIdentifier, const wchar_t* lines[], size_t count, int lineSpacing)

            FSBounds* CALL boundsForText(const char* text) = 0;
            FSBounds* CALL boundsForWideText(const wchar_t* text) = 0;

* 2004-06-26

    Released Build 2.

* 2004-09-30

    * Restructured build process.
    * Added unit tests to source directory.