Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 550 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 550 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 26 - File: global.php(872) : eval()'d code PHP 8.1.27 (FreeBSD)
File Line Function
/global.php(872) : eval()'d code 26 errorHandler->error
/global.php 872 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error

Screen DPI (ppi or Pixel Density) - Printable Version
The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 550 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 550 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 26 - File: global.php(872) : eval()'d code PHP 8.1.27 (FreeBSD)
File Line Function
/global.php(872) : eval()'d code 26 errorHandler->error
/global.php 872 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error



Official Murl Engine Forum
Screen DPI (ppi or Pixel Density) - Printable Version

+- Official Murl Engine Forum (https://murlengine.com/forum)
+-- Forum: Murl Engine (https://murlengine.com/forum/forumdisplay.php?fid=5)
+--- Forum: General (https://murlengine.com/forum/forumdisplay.php?fid=8)
+--- Thread: Screen DPI (ppi or Pixel Density) (/showthread.php?tid=8)



Screen DPI (ppi or Pixel Density) - ymyw - 23 Apr 2013

Hi, this is a promising engine.
Can I get device specific DPIs through the API?


RE: Screen DPI (ppi or Pixel Density) - dizzy - 23 Apr 2013

Hi!

Yes, you can obtain physical screen properties through the Murl::IPlatformConfiguration object, by using one of these methods:
- GetPhysicalPixelSizeX()
- GetPhysicalPixelSizeY()
- GetPhysicalScreenSizeX()
- GetPhysicalScreenSizeY()

All of these methods return a size value in millimeters. From that you can easily calculate the actual screen DPI values in X and Y direction, for example in the app's Configure() method:
Bool App::MyApplication::Configure(IEngineConfiguration* engineConfig)
{
    const IPlatformConfiguration* platformConfig = engineConfig->GetPlatformConfiguration();
    
    Real dpiX = 1.0 / (platformConfig->GetPhysicalPixelSizeX() * Math::MM_TO_INCHES);
    Real dpiY = 1.0 / (platformConfig->GetPhysicalPixelSizeY() * Math::MM_TO_INCHES);

    // Do something spectacular using these values :)

    return true;
}

This works well for iOS and Android devices. However on Windows and MacOS, the operating system unfortunately does not provide exact monitor information, so the DPI values reported to the engine are only some sort of "good guess". (For example, MacOS X always reports DPI values of 72, even for built-in screens of a MacBook)

Best regards,

dizzy


RE: Screen DPI (ppi or Pixel Density) - ymyw - 23 Apr 2013

Thanks for the best answer!
The engine seems having almost that we want...
I'll dig it!


RE: Screen DPI (ppi or Pixel Density) - dizzy - 24 Apr 2013

Thanks for your interest!

Don't hesitate to ask if you have any further questions.