| René Nyffenegger's collection of things on the web | |
|
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Morph [Ming wrapper class] | ||
The sourceMorph.h
#ifndef MORPH_H #define MORPH_H #include "Shape.h" #include "Character_.h" class Morph : public Character_ { friend class Movie; friend class MovieClip; public: Morph(); Shape ShapeStart(); Shape ShapeEnd (); private: SWFMorph morph_; protected: // HACK? virtual SWFBlock_s* swf_block() const; }; #endif Morph.cpp
#include "Morph.h"
Morph::Morph() {
morph_ = newSWFMorphShape();
}
Shape Morph::ShapeStart() {
SWFShape s = SWFMorph_getShape1(morph_);
return Shape(s, false);
}
Shape Morph::ShapeEnd() {
SWFShape s = SWFMorph_getShape2(morph_);
return Shape(s, false);
}
SWFBlock_s* Morph::swf_block() const {
return reinterpret_cast<SWFBlock_s*>(morph_);
}
Examples
The following examples demonstrate this class:
|