www.pudn.com > C++_Flash.rar > SWFMorphShape.h


// SWFMorphShape.h: interface for the CSWFMorphShape class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(SWFMORPHSHAPE_H) 
#define SWFMORPHSHAPE_H 
 
#include "Definitions.h" 
#include "SWFObject.h" 
#include "SWFRectangle.h" 
#include "SWFMatrix.h" 
 
class CSWFMorphShape : public CSWFObject 
{ 
public: 
	CSWFMorphShape(USHORT nMorphID, USHORT depth, RECT_F startRect, RECT_F endRect); 
	virtual ~CSWFMorphShape(); 
 
public: 
	// Style methods 
	void AddLineStyle(int startWidth, SWF_RGBA startColor, int endWidth, SWF_RGBA endColor); 
	void AddSolidFillStyle(SWF_RGBA startColor, SWF_RGBA endColor); 
	void AddGradientFillStyle(UCHAR gradientFillType, RECT_F startGradientRect, RECT_F endGradientRect, SWF_MORPHGRADIENTRECORD* gradientRecords, int numRecords); 
	void AddBitmapFillStyle(USHORT bitmapID, UCHAR bitmapFillType, RECT_F bitmapRect, RECT_F startClipRect, RECT_F endClipRect); 
	void ChangeStyle(int lineStyleIndex, int fillStyleIndex0, int fillStyleIndex1, POINT_F* newPosition, bool bStart); 
 
	// Drawing methods 
	void AddLineSegment(POINT_F offsetPoint, bool bStart); 
	void AddLineSegment(float xOffset, float yOffset, bool bStart); 
	void AddCurveSegment(POINT_F controlPoint, POINT_F anchorPoint, bool bStart); 
	void AddCurveSegment(float controlPointX, float controlPointY, float anchorPointX, float anchorPointY, bool bStart); 
 
	// Transformation methods 
	void Scale(float scaleX, float scaleY); 
	void Rotate(float angle); 
	void Translate(float translateX, float translateY); 
	void Shear(float shearX, float shearY); 
 
	// Special methods 
	UCHAR* BuildSWFStream(); 
	int GetSWFStreamLength(); 
 
private: 
	// Private methods 
	UCHAR* BuildRecordArraySWFStream(int numLineIndexBits, int numFillIndexBits, int& streamLength, SWF_SHAPERECORD* pRecordArray, int numShapes); 
 
private: 
	// Private members 
	SWF_DEFINE_MORPHSHAPE_TAG m_MorphShape; 
	int m_NumberStartShapes; 
	int m_NumberEndShapes; 
	UCHAR* m_SWFStream; 
	int m_SWFStreamLength; 
 
public: 
	// Public members 
	CSWFMatrix m_TransformationMatrix; 
 
}; 
 
#endif // !defined(SWFMORPHSHAPE_H)