penpat_options.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 
00022 
00023 #if !defined PENPAT_OPTIONS_HEADER
00024 #define PENPAT_OPTIONS_HEADER
00025 
00030 
00031 
00032 class WHIPTK_API WT_PenPat_Options : public WT_Attribute
00033 {
00034         friend class WT_Rendering_Options;
00035         friend class WT_W2D_Class_Factory;
00036         friend class WT_Opcode;
00037 
00038 protected:
00039     WT_Boolean               m_scale_pen_width;
00040     WT_Boolean               m_map_colors_to_gray_scale;
00041     WT_Boolean               m_use_alternate_fill_rule;
00042     WT_Boolean               m_use_error_diffusion_for_DWF_Rasters;
00043 
00044     enum
00045     {
00046         Getting_Operand,
00047         Getting_Scale_Pen_Width,
00048         Getting_Map_Colors_To_Gray_Scale,
00049         Getting_Use_Alternate_Fill_Rule,
00050         Getting_Use_Error_Diffusion_For_DWF_Rasters,
00051         Getting_Close_Paren,
00052         Completed
00053     } m_stage;
00054 
00055 public:
00056 
00058 
00059     WT_PenPat_Options()
00060         : m_stage(Getting_Operand)
00061     {
00062         m_scale_pen_width = WD_True;
00063         m_map_colors_to_gray_scale = WD_True;
00064         m_use_alternate_fill_rule = WD_True;
00065         m_use_error_diffusion_for_DWF_Rasters = WD_False;
00066     }
00067 
00069     WT_PenPat_Options(
00070         WT_Boolean const scale_pen_width,
00071         WT_Boolean const map_colors_to_gray_scale,
00072         WT_Boolean const use_alternate_fill_rule,
00073         WT_Boolean const use_error_diffusion_for_DWF_Rasters)
00074     {
00075         m_scale_pen_width = scale_pen_width;
00076         m_map_colors_to_gray_scale = map_colors_to_gray_scale;
00077         m_use_alternate_fill_rule = use_alternate_fill_rule;
00078         m_use_error_diffusion_for_DWF_Rasters = use_error_diffusion_for_DWF_Rasters;
00079     }
00080 
00082     WT_PenPat_Options(WT_PenPat_Options const & other)
00083         : WT_Attribute()
00084     {
00085         *this = other;
00086     }
00087 
00088         virtual ~WT_PenPat_Options()
00089         {}
00091 public:
00093 
00094     WT_Boolean const get_map_colors_to_gray_scale() const { return m_map_colors_to_gray_scale; }
00096     WT_Boolean const get_scale_pen_width() const { return m_scale_pen_width; }
00098     WT_Boolean const get_use_alternate_fill_rule() const { return m_use_alternate_fill_rule; }
00100     WT_Boolean const get_use_error_diffusion_for_DWF_Rasters() const { return m_use_error_diffusion_for_DWF_Rasters; }
00102 
00103     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; }
00105 
00107     void             set_scale_pen_width(WT_Boolean scale_pen_width) { m_scale_pen_width = scale_pen_width; }
00109     void             set_use_alternate_fill_rule(WT_Boolean use_alternate_fill_rule) { m_use_alternate_fill_rule = use_alternate_fill_rule; }
00111 
00113     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; }
00115     virtual WT_PenPat_Options const &   operator=(WT_PenPat_Options const & options);
00117 
00119     WT_ID            object_id() const;
00120     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00121     WT_Result        process(WT_File & file);
00122     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00123     WT_Result        serialize (WT_File & file) const;
00124     WT_Result        sync (WT_File & file) const;
00125     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00127 
00129 
00131     static WT_Result default_process(
00132         WT_PenPat_Options & item, 
00133         WT_File & file 
00134         );
00135 
00136 
00137 };
00138 
00140 
00141 #endif // PENPAT_OPTIONS_HEADER

Generated on Tue Jan 6 22:41:13 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5