/* libzzinet
 *
 * This program is distributed under the GNU General Public License, version 2.
 * A copy of this license is included with this source.
 *
 * Copyright 2000-2006, Toni Thomsson <toni@tonjac.org> 
*/

#ifndef zz_image_font_h
#define zz_image_font_h

#include <zz_export.h>

extern "C"
{
#include <gd.h>
}

// Description: Textorientering
typedef enum
{
    ZZ_IMAGE_FONT_HORIZONTAL = 0,
    ZZ_IMAGE_FONT_VERTICAL = 1

} ZZ_IMAGE_FONT_ORIENTATION;

// Description: Fonter
typedef enum
{
    ZZ_IMAGE_FONT_TINY = 0,
    ZZ_IMAGE_FONT_SMALL = 1,
    ZZ_IMAGE_FONT_MEDIUM = 2,
    ZZ_IMAGE_FONT_LARGE = 3,
    ZZ_IMAGE_FONT_HUGE = 4

} ZZ_IMAGE_FONT_TYPE;

/*
    Description:
    GIF font

    Library:
    libgd.a libzzinet.a (HPUX) libgd.lib libzzinet.lib (win32)

    Platform:
    HPUX, win32

    Author:
    Toni Thomsson, toni@tonjac.org
*/
class ZZ_API CzzImageFont
{
public:
    
    /*
        Description:
        Skapar en font

        Remarks:
        Skapar en font av en viss typ/storlek
    */
    CzzImageFont( const ZZ_IMAGE_FONT_TYPE& type    // IN, typ/storlek
                     );

    /*
        Remarks:
        Kopieringskonstruktor
    */
    CzzImageFont( const CzzImageFont& obj );

    // Description: Destruktor
    virtual ~CzzImageFont();

    // Description: Vertikal text
    static ZZ_IMAGE_FONT_ORIENTATION vertical( void );

    // Description: Horisontell text
    static ZZ_IMAGE_FONT_ORIENTATION horizontal( void );

    // Description: Tilldelningsoperator
    const CzzImageFont& operator=( const CzzImageFont& obj );

    // Description: Font typ/storlek
    const ZZ_IMAGE_FONT_TYPE& getType( void ) const;

    // Description: Fontbredd    
    int getWidth( void ) const;

    // Description: Fonthöjd
    int getHeight( void ) const;

protected:

    /*
        Description:
        Returnerar en pekare till angiven font
                
        Remarks:
        protected
    */
    gdFontPtr findFontPtr( void ) const;

private:
    ZZ_IMAGE_FONT_TYPE m_Type;

};

#endif // zz_image_font_h