diff options
author | David Robillard <d@drobilla.net> | 2022-05-21 21:28:08 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-05-21 22:03:22 -0400 |
commit | fdd6de0d12ea17f713ec3e73e7968198339b7b6d (patch) | |
tree | 800b75e676f8320c2e22b3590751a63be3741fc5 /include | |
parent | a88b470d9c954073fcfcfeca2242809532eaf048 (diff) | |
download | pugl-fdd6de0d12ea17f713ec3e73e7968198339b7b6d.tar.gz pugl-fdd6de0d12ea17f713ec3e73e7968198339b7b6d.tar.bz2 pugl-fdd6de0d12ea17f713ec3e73e7968198339b7b6d.zip |
Add puglGetScaleFactor()
Diffstat (limited to 'include')
-rw-r--r-- | include/pugl/pugl.h | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ -973,6 +973,22 @@ 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 Functions for working with the position and size of a view. |