Tiling, scaling, etc.
Signed-off-by: Joe Konno <joe.konno@intel.com>
(void) elm_bg_file_set(*this, p.c_str(), NULL);
}
+void Background::setImageOpt(Elm_Bg_Option option)
+{
+ elm_bg_option_set(*this, option);
+}
+
void Background::getColor(int* red, int* green, int* blue)
{
elm_bg_color_get(*this, red, green, blue);
p = ret;
}
+Elm_Bg_Option Background::getImageOpt()
+{
+ return elm_bg_option_get(*this);
+}
+
Background::operator Evas_Object*()
{
return EvasObject::obj_;
void setColor(int, int, int);
void setImage(const path&);
+ void setImageOpt(Elm_Bg_Option);
void getColor(int*, int*, int*);
void getImage(path&);
+ Elm_Bg_Option getImageOpt();
operator Evas_Object*();
{
bg_.show();
window_.show();
+ window_.maximize(EINA_TRUE);
path p(MEDIA_PATH"/crater_lake.png");
boost::bind(&BackgroundImageTest::checkImage, boost::ref(*this), p)
)
);
+
+ Elm_Bg_Option option[] = { ELM_BG_OPTION_CENTER,
+ ELM_BG_OPTION_SCALE,
+ ELM_BG_OPTION_STRETCH,
+ ELM_BG_OPTION_TILE
+ };
+
+ unsigned int o;
+ for (o = 0; o < (sizeof(option) / sizeof(Elm_Bg_Option)); o++)
+ {
+ queueCallback(
+ ModifyCheckCallback(
+ boost::bind(&Background::setImageOpt, boost::ref(bg_), option[o]),
+ boost::bind(&BackgroundImageTest::checkImageOpt, boost::ref(*this), option[o])
+ )
+ );
+ }
}
void checkImage(path& p)
BOOST_CHECK_EQUAL(ret, p);
}
+ void checkImageOpt(Elm_Bg_Option option)
+ {
+ BOOST_CHECK_EQUAL(option, bg_.getImageOpt());
+ }
+
private:
Window window_;
Background bg_;