MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / dp2px

Method dp2px

CodenameOne/src/com/codename1/ui/Component.java:2389–2391  ·  view source on GitHub ↗
(int dp)

Source from the content-addressed store, hash-verified

2387 ///
2388 /// Value converted to pixels.
2389 private int dp2px(int dp) {
2390 return CN.convertToPixels(dp / 96f * 25.4f);
2391 }
2392
2393 /// Initial implementation used separate shadow rendering on each platform's native layer via the
2394 /// platform's drawShadow() method. However, performance in the simulator was terrible, so I implemented

Callers 2

drawShadowMethod · 0.95

Calls 1

convertToPixelsMethod · 0.95

Tested by

no test coverage detected