General Terminal

GtGetContentScale

Get the content scale

Syntax

Signature
double GtGetContentScale( void );

Arguments

No arguments.

Return value

The content scaling factor reported by the driver.

Description

Reports the scale the backend applies to UI content in window coordinates. On GLFW, the content scale accounts for the ratio of output pixels to window coordinates.

Example

gtgetcontentscale.c
#include "xdev-wtui.h"

#include <stdio.h>

int main( void )
{
   printf( "Content scale: %.2f\n", GtGetContentScale() );

   return 0;
}

See also