From fdd6de0d12ea17f713ec3e73e7968198339b7b6d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 21 May 2022 21:28:08 -0400 Subject: Add puglGetScaleFactor() --- include/pugl/pugl.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index a7dd7eb..0d4642c 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -972,6 +972,22 @@ PUGL_API int puglGetViewHint(const PuglView* view, PuglViewHint hint); +/** + Return the scale factor of the view. + + This factor describe how large UI elements (especially text) should be + compared to "normal". For example, 2.0 means the UI should be drawn twice + as large. + + "Normal" is loosely defined, but means a good size on a "standard DPI" + display (around 96 DPI). In other words, the scale 1.0 should have text + that is reasonably sized on a 96 DPI display, and the scale 2.0 should have + text twice that large. +*/ +PUGL_API +double +puglGetScaleFactor(const PuglView* view); + /** @} @defgroup frame Frame -- cgit v1.2.1