xfreerdp-client: exposed scaling API

This commit is contained in:
C-o-r-E 2013-06-06 19:44:29 -04:00
parent e72b79940c
commit e4dfa00c27
2 changed files with 13 additions and 0 deletions

View File

@ -1684,6 +1684,18 @@ double freerdp_client_get_scale(xfInfo* xfi)
return xfi->scale;
}
void freerdp_client_set_scale(xfInfo* xfi, double newScale)
{
xfi->scale = newScale;
xfi->currentWidth = xfi->originalWidth * xfi->scale;
xfi->currentHeight = xfi->originalHeight * xfi->scale;
xf_transform_window(xfi);
IFCALL(xfi->client->OnResizeWindow, xfi->instance, xfi->originalWidth * xfi->scale, xfi->originalHeight * xfi->scale);
xf_draw_screen_scaled(xfi, 0, 0, 0, 0, FALSE);
}
int freerdp_client_get_xpan(xfInfo* xfi)
{
return xfi->offset_x;

View File

@ -248,6 +248,7 @@ FREERDP_API int freerdp_client_get_xpan(xfInfo* xfi);
FREERDP_API int freerdp_client_get_ypan(xfInfo* xfi);
FREERDP_API double freerdp_client_get_scale(xfInfo* xfi);
FREERDP_API void freerdp_client_set_scale(xfInfo* xfi, double newScale);
FREERDP_API void freerdp_client_reset_scale(xfInfo* xfi);
FREERDP_API int freerdp_client_global_init();