}
void LOTPathDataItem::update(int frameNo, const VMatrix &parentMatrix,
- float parentAlpha, const DirtyFlag &flag)
+ float, const DirtyFlag &flag)
{
VPath tempPath;
mPathChanged = false;
- mCombinedAlpha = parentAlpha;
// 1. update the local path if needed
if (!(mInit && mStaticPath) && hasChanged(frameNo)) {
VDrawable *drawable, bool sameParent)
{
VColor color = mColor;
- if (sameParent)
- color.setAlpha(color.a * pathNode->combinedAlpha());
- else
- color.setAlpha(color.a * parentAlpha() * pathNode->combinedAlpha());
+
+ color.setAlpha(color.a * parentAlpha());
VBrush brush(color);
drawable->setBrush(brush);
drawable->setFillRule(mFillRule);
VDrawable *drawable, bool sameParent)
{
VColor color = mColor;
- if (sameParent)
- color.setAlpha(color.a * pathNode->combinedAlpha());
- else
- color.setAlpha(color.a * parentAlpha() * pathNode->combinedAlpha());
+ color.setAlpha(color.a * parentAlpha());
VBrush brush(color);
drawable->setBrush(brush);
float scale = getScale(mParentMatrix);
void update(int frameNo, const VMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag) final;
VPath path() const;
void addTrimOperation(std::vector<LOTTrimItem *> &list);
- inline float combinedAlpha() const{ return mCombinedAlpha;}
void renderList(std::vector<VDrawable *> &list) final;
private:
std::vector<LOTTrimItem *> mTrimNodeRefs;
VPath mLocalPath;
VPath mFinalPath;
bool mPathChanged;
- float mCombinedAlpha;
protected:
virtual void updatePath(VPath& path, int frameNo) = 0;
virtual bool hasChanged(int frameNo) = 0;