pattern_scale.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 PATTERN_SCALE_HEADER
00024 #define PATTERN_SCALE_HEADER
00025 
00026 #include "whiptk/whipcore.h"
00027 
00029 
00041 class WHIPTK_API WT_Pattern_Scale : public WT_Option
00042 {
00043     friend class WT_Fill_Pattern;
00044     friend class WT_Line_Pattern;
00045         friend class WT_Font;
00046         friend class WT_Line_Style;
00047         friend class WT_User_Fill_Pattern;
00048         friend class WT_W2D_Class_Factory;
00049 
00050 protected:
00052 
00053     WT_Pattern_Scale()
00054     : m_stage( Eating_Initial_Whitespace )
00055     , m_value( ( double ) 0.0 )
00056     {}
00057         virtual ~WT_Pattern_Scale()
00058         {}
00060 public:
00062 
00063     inline operator double () const { return m_value; }
00065     inline WT_Pattern_Scale & operator= ( double i ) { m_value = i; return *this; }
00067 
00069 
00070     inline WT_Boolean operator== ( WT_Pattern_Scale const & scale ) const { return m_value == scale.m_value; }
00072     inline WT_Boolean operator== ( double const & value ) const { return m_value == value; }
00074     inline WT_Boolean operator!= ( WT_Pattern_Scale const & scale ) const { return m_value != scale.m_value; }
00076     inline WT_Boolean operator!= ( double const & value ) const { return m_value != value; }
00078 
00080     WT_Result serialize( WT_Object const & parent, WT_File & file ) const;
00081     WT_Result materialize( WT_Object& parent , WT_Optioncode const & optioncode, WT_File& file);
00083 
00084 private:
00085     WT_ID     object_id() const { return Option_ID; }
00086     enum WT_Materialize_Stage
00087     {   Eating_Initial_Whitespace,
00088         Getting_Value,
00089         Eating_End_Whitespace
00090     } m_stage;
00091     double m_value;
00092 };
00093 
00094 #endif // PATTERN_SCALE_HEADER

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