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

penpat_options.h

00001 //  Copyright (c) 1996-2001 by Autodesk, Inc.
00002 //
00003 //  By using this code, you are agreeing to the terms and conditions of
00004 //  the License Agreement included in the documentation for this code.
00005 //
00006 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00007 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00008 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00009 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00010 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00011 //
00012 //  Use, duplication, or disclosure by the U.S. Government is subject to
00013 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00014 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00015 //  Data and Computer Software), as applicable.
00016 //
00017 
00018 #if !defined PENPAT_OPTIONS_HEADER
00019 #define PENPAT_OPTIONS_HEADER
00020 
00025 
00026 
00027 class WHIPTK_API WT_PenPat_Options : public WT_Attribute
00028 {
00029 private:
00030     WT_Boolean               m_scale_pen_width;
00031     WT_Boolean               m_map_colors_to_gray_scale;
00032     WT_Boolean               m_use_alternate_fill_rule;
00033     WT_Boolean               m_use_error_diffusion_for_DWF_Rasters;
00034 
00035     enum
00036     {
00037         Getting_Operand,
00038         Getting_Scale_Pen_Width,
00039         Getting_Map_Colors_To_Gray_Scale,
00040         Getting_Use_Alternate_Fill_Rule,
00041         Getting_Use_Error_Diffusion_For_DWF_Rasters,
00042         Getting_Close_Paren,
00043         Completed
00044     } m_stage;
00045 
00046 public:
00047 
00049 
00050     WT_PenPat_Options()
00051         : m_stage(Getting_Operand)
00052     {
00053         m_scale_pen_width = WD_True;
00054         m_map_colors_to_gray_scale = WD_True;
00055         m_use_alternate_fill_rule = WD_True;
00056         m_use_error_diffusion_for_DWF_Rasters = WD_False;
00057     }
00058 
00060     WT_PenPat_Options(
00061         WT_Boolean const scale_pen_width,
00062         WT_Boolean const map_colors_to_gray_scale,
00063         WT_Boolean const use_alternate_fill_rule,
00064         WT_Boolean const use_error_diffusion_for_DWF_Rasters)
00065     {
00066         m_scale_pen_width = scale_pen_width;
00067         m_map_colors_to_gray_scale = map_colors_to_gray_scale;
00068         m_use_alternate_fill_rule = use_alternate_fill_rule;
00069         m_use_error_diffusion_for_DWF_Rasters = use_error_diffusion_for_DWF_Rasters;
00070     }
00071 
00073     WT_PenPat_Options(WT_PenPat_Options const & other)
00074         : WT_Attribute()
00075     {
00076         *this = other;
00077     }
00079 
00081 
00082     WT_Boolean const get_map_colors_to_gray_scale() const { return m_map_colors_to_gray_scale; }
00084     WT_Boolean const get_scale_pen_width() const { return m_scale_pen_width; }
00086     WT_Boolean const get_use_alternate_fill_rule() const { return m_use_alternate_fill_rule; }
00088     WT_Boolean const get_use_error_diffusion_for_DWF_Rasters() const { return m_use_error_diffusion_for_DWF_Rasters; }
00090 
00091     void             set_map_colors_to_gray_scale(WT_Boolean map_colors_to_gray_scale) { m_map_colors_to_gray_scale = map_colors_to_gray_scale; }
00093 
00095     void             set_scale_pen_width(WT_Boolean scale_pen_width) { m_scale_pen_width = scale_pen_width; }
00097     void             set_use_alternate_fill_rule(WT_Boolean use_alternate_fill_rule) { m_use_alternate_fill_rule = use_alternate_fill_rule; }
00099 
00101     void             use_error_diffusion_for_DWF_Rasters(WT_Boolean use_error_diffusion_for_DWF_Rasters) { m_use_error_diffusion_for_DWF_Rasters = use_error_diffusion_for_DWF_Rasters; }
00103     WT_PenPat_Options const &   operator=(WT_PenPat_Options const & options);
00105 
00107     WT_ID            object_id() const;
00108     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00109     WT_Result        process(WT_File & file);
00110     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00111     WT_Result        serialize (WT_File & file) const;
00112     WT_Result        sync (WT_File & file) const;
00113     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00115 
00117 
00119     static WT_Result default_process(
00120         WT_PenPat_Options & item, 
00121         WT_File & file 
00122         );
00123 
00124 
00125 };
00126 
00128 
00129 #endif // PENPAT_OPTIONS_HEADER

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