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

WhipExamples/LinePattern.cpp

#include "whiptk/whip_toolkit.h"

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

WT_Result LinePattern()
{
    //Store the current line pattern.
    WT_Line_Pattern previous_pattern = whip_file.desired_rendition().line_pattern();
    //Set the line pattern.
    whip_file.desired_rendition().line_pattern() = WT_Line_Pattern::ISO_Dash_Triple_Dot;
    //Create a filled drawable (e.g. a polygon).
    int x=0,y=0;
    WT_Logical_Point vP[2];
    vP[0] = WT_Logical_Point(x, y);
    vP[1] = WT_Logical_Point(x+100, y);
    WT_Polyline p (2, vP, WD_True);
    //Serialize it.
    WD_CHECK(p.serialize (whip_file));
    //Restore the previous pattern.
    whip_file.desired_rendition().line_pattern() = previous_pattern;

    return WT_Result::Success;
}

Generated on Tue May 17 12:38:50 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1