diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-13 16:18:56 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-13 16:18:56 +0100 |
commit | dfc9e510aedb52375da02a8776259d21ecf14587 (patch) | |
tree | 17054b06a3452a0c563701a6afc623286e58e51a /dw/fltkplatform.cc | |
parent | 7b81c09bb70cdfd59f80685eb218b1b883f04240 (diff) |
add dpiX () / dpiY () methods to Platform and Layout
Diffstat (limited to 'dw/fltkplatform.cc')
-rw-r--r-- | dw/fltkplatform.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc index 337f4dba..1d83dbb8 100644 --- a/dw/fltkplatform.cc +++ b/dw/fltkplatform.cc @@ -25,6 +25,7 @@ #include <fltk/draw.h> #include <fltk/run.h> #include <fltk/events.h> +#include <fltk/Monitor.h> #include <fltk/utf.h> #include <stdio.h> @@ -301,6 +302,16 @@ int FltkPlatform::prevGlyph (const char *text, int idx) return utf8back (&text[idx - 1], text, &text[strlen (text)]) - text; } +float FltkPlatform::dpiX () +{ + return ::fltk::Monitor::all ().dpi_x (); +} + +float FltkPlatform::dpiY () +{ + return ::fltk::Monitor::all ().dpi_y (); +} + void FltkPlatform::generalStaticIdle (void *data) { ((FltkPlatform*)data)->generalIdle(); |