Fixed #4566: Constructor added for LayerGradient

This commit is contained in:
pandamicro 2014-03-26 18:45:08 +08:00
parent 54e43a9da5
commit 63772f7d72
2 changed files with 21 additions and 4 deletions

View File

@ -630,6 +630,19 @@ std::string LayerColor::getDescription() const
//
// LayerGradient
//
LayerGradient::LayerGradient()
: _startColor(Color4B(0, 0, 0, 255))
, _endColor(Color4B(0, 0, 0, 255))
, _startOpacity(255)
, _endOpacity(255)
, _alongVector(Point(0, -1))
, _compressedInterpolation(true)
{
}
LayerGradient::~LayerGradient() {
}
LayerGradient* LayerGradient::create(const Color4B& start, const Color4B& end)
{
LayerGradient * layer = new LayerGradient();

View File

@ -392,6 +392,10 @@ public:
virtual std::string getDescription() const override;
CC_CONSTRUCTOR_ACCESS:
LayerGradient();
virtual ~LayerGradient();
protected:
virtual void updateColor() override;