add rotation support for the gdi engine
SVN revision: 40916
This commit is contained in:
parent
33cfc873ec
commit
87b0ca2ab1
|
@ -499,29 +499,17 @@ _ecore_evas_win32_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
|
|||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_win32_rotation_set(Ecore_Evas *ee, int rotation)
|
||||
_ecore_evas_win32_rotation_set_internal(Ecore_Evas *ee, int rotation)
|
||||
{
|
||||
int rot_dif;
|
||||
|
||||
EINA_ERROR_PINFO("ecore evas rotation: %s\n", rotation ? "yes" : "no");
|
||||
|
||||
if (ee->rotation == rotation) return;
|
||||
rot_dif = ee->rotation - rotation;
|
||||
if (rot_dif < 0) rot_dif = -rot_dif;
|
||||
|
||||
if (!strcmp(ee->driver, "software_ddraw"))
|
||||
{
|
||||
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
|
||||
Evas_Engine_Info_Software_DDraw *einfo;
|
||||
|
||||
einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ee->evas);
|
||||
if (!einfo) return;
|
||||
if (rot_dif != 180)
|
||||
{
|
||||
int minw, minh, maxw, maxh, basew, baseh, stepw, steph;
|
||||
|
||||
einfo->info.rotation = rotation;
|
||||
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
|
||||
if (!ee->prop.fullscreen)
|
||||
{
|
||||
ecore_win32_window_resize(ee->prop.window, ee->h, ee->w);
|
||||
|
@ -560,19 +548,50 @@ _ecore_evas_win32_rotation_set(Ecore_Evas *ee, int rotation)
|
|||
}
|
||||
else
|
||||
{
|
||||
einfo->info.rotation = rotation;
|
||||
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
|
||||
ee->rotation = rotation;
|
||||
_ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
|
||||
ecore_win32_current_time_get());
|
||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||
}
|
||||
|
||||
if ((ee->rotation == 90) || (ee->rotation == 270))
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
|
||||
else
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
||||
#endif /* BUILD_ECORE_EVAS_SOFTWARE_DDRAW */
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_win32_rotation_set(Ecore_Evas *ee, int rotation)
|
||||
{
|
||||
EINA_ERROR_PINFO("ecore evas rotation: %s\n", rotation ? "yes" : "no");
|
||||
|
||||
if (ee->rotation == rotation) return;
|
||||
|
||||
#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
|
||||
if (!strcmp(ee->driver, "software_gdi"))
|
||||
{
|
||||
Evas_Engine_Info_Software_Gdi *einfo;
|
||||
|
||||
einfo = (Evas_Engine_Info_Software_Gdi *)evas_engine_info_get(ee->evas);
|
||||
if (!einfo) return;
|
||||
einfo->info.rotation = rotation;
|
||||
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
|
||||
_ecore_evas_win32_rotation_set_internal(ee, rotation);
|
||||
}
|
||||
#endif /* BUILD_ECORE_EVAS_SOFTWARE_GDI */
|
||||
|
||||
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
|
||||
if (!strcmp(ee->driver, "software_ddraw"))
|
||||
{
|
||||
Evas_Engine_Info_Software_DDraw *einfo;
|
||||
|
||||
einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ee->evas);
|
||||
if (!einfo) return;
|
||||
einfo->info.rotation = rotation;
|
||||
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
|
||||
_ecore_evas_win32_rotation_set_internal(ee, rotation);
|
||||
}
|
||||
#endif /* BUILD_ECORE_EVAS_SOFTWARE_DDRAW */
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue