General Terminal

GtGetPixelDensity

Get the pixel density

Syntax

Signature
double GtGetPixelDensity( void );

Arguments

No arguments.

Return value

The output-pixel density reported by the driver.

Description

On GLFW this is the number of framebuffer pixels per window-coordinate unit. A driver that draws directly in window pixels can report 1.0.

Example

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

#include <stdio.h>

int main( void )
{
   printf( "Pixel density: %.2f\n", GtGetPixelDensity() );

   return 0;
}

See also