- imageView.SetName( filename );
- imageView.SetParentOrigin(ParentOrigin::CENTER);
- imageView.SetAnchorPoint(AnchorPoint::CENTER);
+/**
+ * Creates an ImageView
+ *
+ * @param[in] filename The path of the image.
+ * @param[in] width The width of the image in pixels.
+ * @param[in] height The height of the image in pixels.
+ * @param[in] fittingMode The mode to use when scaling the image to fit the desired dimensions.
+ */
+ImageView CreateImageView(const std::string& filename, unsigned int width, unsigned int height, Dali::FittingMode::Type fittingMode )
+{
+ Image img = CreateImage( filename, width, height, fittingMode );
+ ImageView actor = ImageView::New( img );
+ actor.SetName( filename );
+ actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetAnchorPoint(AnchorPoint::CENTER);