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

pattern_scale.h

00001 //  Copyright (c) 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 PATTERN_SCALE_HEADER
00019 #define PATTERN_SCALE_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 
00024 
00036 class WHIPTK_API WT_Pattern_Scale : public WT_Option
00037 {
00038     friend class WT_Fill_Pattern;
00039     friend class WT_Line_Pattern;
00040 public:
00042 
00043     WT_Pattern_Scale()
00044     : m_stage( Eating_Initial_Whitespace )
00045     , m_value( ( double ) 0.0 )
00046     {}
00048 
00050 
00051     inline operator double () const { return m_value; }
00053     inline WT_Pattern_Scale & operator= ( double i ) { m_value = i; return *this; }
00055 
00057 
00058     inline WT_Boolean operator== ( WT_Pattern_Scale const & scale ) const { return m_value == scale.m_value; }
00060     inline WT_Boolean operator== ( double const & value ) const { return m_value == value; }
00062     inline WT_Boolean operator!= ( WT_Pattern_Scale const & scale ) const { return m_value != scale.m_value; }
00064     inline WT_Boolean operator!= ( double const & value ) const { return m_value != value; }
00066 
00068     WT_Result serialize( WT_Object const & parent, WT_File & file ) const;
00069     WT_Result materialize( WT_Object& parent , WT_Optioncode const & optioncode, WT_File& file);
00071 
00072 private:
00073     WT_ID     object_id() const { return Option_ID; }
00074     enum WT_Materialize_Stage
00075     {   Eating_Initial_Whitespace,
00076         Getting_Value,
00077         Eating_End_Whitespace
00078     } m_stage;
00079     double m_value;
00080 };
00081 
00082 #endif // PATTERN_SCALE_HEADER

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