mirror of https://github.com/FreeRDP/FreeRDP
xfreerdp-client: exposed scaling API
This commit is contained in:
parent
e72b79940c
commit
e4dfa00c27
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue