efl_gfx_color: fix color_code_set
Summary:
There are two parts for this patch:
1- Fix sigmentation fault when using (efl_gfx_color_color_code_set). // It try to modify const variable
2- Remove unnecessary code. // why would user pass slash or back slash as color code format.
Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h>
#include <Efl_Ui.h>
static void
_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
efl_exit(0);
}
static void
_gui_setup()
{
Eo *win, *rect;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Hello World"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// when the user clicks "close" on a window there is a request to delete
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS,win);
const char *color = "#
FF0000FF";
efl_gfx_color_code_set(rect,color);
evas_object_resize(rect,250,250);
evas_object_resize(win,250,250);
evas_object_move(rect,0,0);
evas_object_show(rect);
evas_object_show(win);
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
_gui_setup();
}
EFL_MAIN()
```
Reviewers: zmike, cedric, segfaultxavi, woohyun
Reviewed By: segfaultxavi
Subscribers: singh.amitesh, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9422