virtual ~ImageRenderer();
/**
+ * Called in the render-thread when the renderer is removed
+ */
+ void OnRemove();
+
+ /**
* Set the texture used to render.
* @param[in] textureId The id of the texture used to render.
*/
void SetNinePatchBorder( const Vector4& border, bool inPixels );
/**
+ * Set whether the ImageRenderer should use blending
+ * @param[in] useBlend True if blending should be used.
+ */
+ void SetUseBlend( bool useBlend );
+
+ /**
+ * Set the blending options.
+ * @param[in] options A bitmask of blending options.
+ */
+ void SetBlendingOptions( unsigned int options );
+
+ /**
+ * Set the blend color.
+ * @param[in] color The new blend-color.
+ */
+ void SetBlendColor( const Vector4& color );
+
+ /**
* Calculate the mesh data used by the ImageRenderer.
* @param[in] type The type of mesh data required; either quad, nine-patch or grid.
* @param[in] targetSize The size which the mesh data should fit inside.
*/
virtual void DoRender( Context& context, TextureCache& textureCache, BufferIndex bufferIndex, Program& program, const Matrix& modelViewMatrix, const Matrix& viewMatrix );
+ /**
+ * @copydoc Dali::Internal::SceneGraph::Renderer::DoSetBlending()
+ */
+ virtual void DoSetBlending( Context& context, BufferIndex bufferIndex );
+
protected: // TextureObserver implementation
/**
Vector2 mGeometrySize;
ResourceId mTextureId;
+ BlendingOptions mBlendingOptions;
+
// flags
MeshType mMeshType : 3; // 4 values fits in 3 bits just fine
bool mIsMeshGenerated : 1;
bool mBorderInPixels : 1;
+ bool mUseBlend : 1; ///< True if blending should be enabled, 1 bit is enough
bool mUsePixelArea : 1;
};