Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

Text.cpp

#include "whiptk/whip_toolkit.h"

extern WT_File whip_file; //Assume this has been opened for writing elsewhere.

WT_Result Text()
{
    int x=0, y=0;

    //Define scoring positions.
    WT_Unsigned_Integer16 score_pos[6] = { 0, 1, 2, 3, 4, 5};
    //Define a bounding box.
    WT_Logical_Point bounds[4];
    bounds[0].m_x = x;
    bounds[0].m_y = y-200;
    bounds[1].m_x = x+1190;
    bounds[1].m_y = y-200;
    bounds[2].m_x = x+1190;
    bounds[2].m_y = y;
    bounds[3].m_x = x;
    bounds[3].m_y = y;

    //Create text with overscoring, underscoring, and a bounding box
    WT_Text text = WT_Text ( WT_Logical_Point(x, y-200), WT_String("Text 1"), bounds, 6, score_pos, 6, score_pos);
    //Serialize it.
    WD_CHECK(text.serialize(whip_file));

    //Create simple text using current rendition settings.
    text = WT_Text(WT_Logical_Point(x, y-500), WT_String("Text 2"));
    //Serialize it.
    WD_CHECK(text.serialize(whip_file));

    return WT_Result::Success;
}

Generated on Mon May 9 23:16:54 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1