XamlArcSegment.h

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 #if !defined XAML_ARCSEGMENT
00019 #define XAML_ARCSEGMENT
00020 
00021 #include "XAML/XamlCore.h"
00022 
00023 #include "XAML/XamlDrawable.h"
00024 #include "XAML/XamlGraphicsObject.h"
00025 #include "XAML/MemoryBuffer.h"
00026 
00027 class WT_Ellipse;
00028 
00029 class XamlArcSegment : public XamlGraphicsObject
00030 {
00031 public:
00032     typedef enum teSweepDirection
00033     {
00034         Clockwise,
00035         Counterclockwise
00036     };
00037 
00038 public:
00039     XamlArcSegment(void);
00040         XamlArcSegment(const XamlArcSegment& s);
00041 
00042     explicit XamlArcSegment(const WT_Outline_Ellipse& rEllipse);
00043     explicit XamlArcSegment(const WT_Filled_Ellipse& rEllipse);
00044     virtual ~XamlArcSegment(void) throw();
00045 
00046     teGraphicsObjectType type() { return XamlGraphicsObject::ArcSegment; }
00047     virtual void setWriteStart(bool b) { _bIsWriteStart = b; }
00048 
00049     virtual WT_Result   serializeAttributeValue( WT_XAML_File &rFile, tMemoryBuffer*& rpBuffer ) const;
00050 
00051     const WT_Integer32& major() const           { return _nMajor; }
00052           WT_Integer32& major()                 { return _nMajor; }
00053     const WT_Integer32& minor() const           { return _nMinor; }
00054           WT_Integer32& minor()                 { return _nMinor; }
00055     const WT_Logical_Point& position() const    { return _oPosition; }
00056           WT_Logical_Point& position()          { return _oPosition; }
00057     const float& start_radian() const           { return _fStart; }
00058           float& start_radian()                 { return _fStart; }
00059     const float& end_radian() const             { return _fEnd; }
00060           float& end_radian()                   { return _fEnd; }
00061     const float& tilt_radian() const            { return _fRotate; }
00062           float& tilt_radian()                  { return _fRotate; }
00063 
00064 private:
00065     bool                _bIsWriteStart;
00066     WT_Integer32        _nMajor;
00067     WT_Integer32        _nMinor;
00068     WT_Logical_Point    _oPosition;
00069     float               _fStart; 
00070     float               _fEnd;
00071     float               _fRotate;
00072     bool                _bIsFilled;
00073     bool                _bIsClosed;
00074 };
00075 
00076 #endif //XAML_ARCSEGMENT

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