{
class ImageView : public Control
{
- protected:
+protected:
/**
* Construct a new ImageView.
*/
virtual ~ImageView();
-
-
public:
/**
* Create a new ImageView.
*/
void SetImage( const std::string& imageUrl, ImageDimensions size );
+ /**
+ * @brief Set whether the Pre-multiplied Alpha Blending is required
+ *
+ * @param[in] preMultipled whether alpha is pre-multiplied.
+ */
+ void EnablePreMultipliedAlpha( bool preMultipled );
+
+ /**
+ * @brief Query whether alpha is pre-multiplied.
+ *
+ * @return True is alpha is pre-multiplied, false otherwise.
+ */
+ bool IsPreMultipliedAlphaEnabled() const;
+
// Properties
/**
* Called when a property of an object of this type is set.
*/
static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+ /**
+ * @brief Set the depth index of this image renderer
+ *
+ * Renderer with higher depth indices are rendered in front of other renderers with smaller values
+ *
+ * @param[in] depthIndex The depth index of this renderer
+ */
+ void SetDepthIndex( int depthIndex );
+
private: // From Control
/**
virtual void OnStageDisconnection();
/**
+ * @copydoc Toolkit::Control::OnSizeSet()
+ */
+ virtual void OnSizeSet( const Vector3& targetSize );
+
+ /**
* @copydoc Toolkit::Control::GetNaturalSize
*/
virtual Vector3 GetNaturalSize();
virtual float GetWidthForHeight( float height );
private:
- /**
- * Attaches mImage member to the renderer, creating the renderers, samplers, meshes and materials if needed
- *
- * @pre mImage has been initialised
- */
- void AttachImage();
-
-private:
// Undefined
ImageView( const ImageView& );
ImageView& operator=( const ImageView& );
std::string mUrl; ///< the url for the image if the image came from a URL, empty otherwise
Image mImage; ///< the Image if the image came from a Image, null otherwise
Property::Map mPropertyMap; ///< the Property::Map if the image came from a Property::Map, empty otherwise
+
+ bool mPremultipledAlphaEnabled; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
};
} // namespace Internal