XamlContrastColor.h

Go to the documentation of this file.
00001 //  Copyright (c) 2001-2006 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 
00019 
00020 
00021 #if !defined XAML_CONTRAST_COLOR_HEADER
00022 #define XAML_CONTRAST_COLOR_HEADER
00023 
00027 
00028 #include "XAML/XamlCore.h"
00029 
00030 #include "whiptk/contrastcolor.h"
00031 
00032 
00043 
00044 class XAMLTK_API WT_XAML_Contrast_Color : public WT_Contrast_Color
00045                                         , public XamlDrawableAttributes::Stroke::Provider
00046                                         , public XamlDrawableAttributes::Fill::Provider
00047                                         , public XamlDrawableAttributes::Stroke::Consumer
00048                                         , public XamlDrawableAttributes::Fill::Consumer
00049                                         , public XamlDrawableAttributes::PathAttributeProvider
00050                                         , public XamlDrawableAttributes::GlyphsAttributeProvider
00051 {
00052         friend class WT_XAML_Class_Factory;
00053         friend class WT_XAML_Rendition;
00054 
00055 protected:
00057 
00058     WT_XAML_Contrast_Color()
00059         : WT_Contrast_Color()
00060         , _pSerializeFile( NULL)
00061     {}
00063     WT_XAML_Contrast_Color(WT_RGBA32 color)
00064         : WT_Contrast_Color(color)
00065         , _pSerializeFile( NULL)
00066     {}
00067     
00069     WT_XAML_Contrast_Color(
00070         int red, 
00071         int green, 
00072         int blue, 
00073         int alpha = 255) 
00074         : WT_Contrast_Color(red,green,blue,alpha)
00075         , _pSerializeFile( NULL)
00076     {}
00077     
00079         WT_XAML_Contrast_Color(const WT_Contrast_Color& color)
00080                 : WT_Contrast_Color(color)
00081         , _pSerializeFile( NULL)
00082         {}
00083 
00084         ~WT_XAML_Contrast_Color()
00085         {}
00086 
00087 public:
00089     WT_Result        serialize (WT_File & file) const;
00091         WT_Result                parseAttributeList(XamlXML::tAttributeMap& rMap, WT_XAML_File& rFile);
00092 
00094 protected:
00095     virtual WT_Result provideStroke(XamlDrawableAttributes::Stroke* & rpStroke);
00096     virtual WT_Result provideFill(XamlDrawableAttributes::Fill*& rpFill);
00097     virtual WT_Result provideGlyphsAttributes( XamlDrawableAttributes::GlyphsAttributeConsumer* p, WT_XAML_File& r) const;
00098     virtual WT_Result providePathAttributes( XamlDrawableAttributes::PathAttributeConsumer*, WT_XAML_File& ) const;
00099     virtual WT_Result consumeStroke(XamlDrawableAttributes::Stroke::Provider* );
00100     virtual WT_Result consumeFill(XamlDrawableAttributes::Fill::Provider* );
00101 
00102 private:
00103     WT_XAML_File *_pSerializeFile;
00104 };
00106 
00107 #endif //XAML_CONTRAST_COLOR_HEADER

Generated on Tue Jan 6 22:40:05 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5