Complicated question.

Complicated question.
0.0 0


Hi everyone!

This is a complicated question: I need to know the millimeters or inches that are crossed by clicking and dragging on the screen. How I can do in cocos2dx (of course, multiplatform)?

Thx in advance!



I’m not sure what’s the purpose… but try these…




hope it helped…


Thanks, but these are the formulas for calculation. What I need is the data (screen’s dpi or ppi and physical resolution), for both iOS and Android.


Searching I’ve found for Android:

DisplayMetrics metrics = new DisplayMetrics();


Give me what I need, but… How can I call this java code from my c++ code?