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

WhipExamples/Polygon.cpp

#include "whiptk/whip_toolkit.h"

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

//Creates a diamond with a hole containing another interior diamond.
WT_Result Polygon()
{
    //Define the polygon coordinates.
    int x=0,y=0;
    WT_Logical_Point diamond[4]; 
    diamond[0] = WT_Logical_Point(x, y+200);
    diamond[1] = WT_Logical_Point(x+200, y); 
    diamond[2] = WT_Logical_Point(x, y-200);
    diamond[3] = WT_Logical_Point(x-200, y);
    //Create the polygon.
    WT_Polygon diamond_polygon(4, diamond, WD_True);
    //Serialize it.
    WD_CHECK(diamond_polygon.serialize(whip_file));

    return WT_Result::Success;
}

Generated on Tue May 17 12:07:43 2005 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.1