Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Contributor
Posts: 12
Registered: ‎03-15-2011
My Device: Tourch OS 6.0
My Carrier: Programmer Beginner

get the dpi screen in webworks

Hello 

I'm working on a software in webworks and i need to draw a line of "1 cm "on the device to measure.

And I need fot it to know the dpi of the screen. 

 

What is the best way to solve this problem ?

 

Thanks

Contributor
Posts: 12
Registered: ‎03-15-2011
My Device: Tourch OS 6.0
My Carrier: Programmer Beginner

Re: get the dpi screen in webworks

Or is there one way to get the physical size of the device which is running the webworks application ? 

Developer
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: get the dpi screen in webworks

Did you mean, size of the device, or,
screen size of the device??
Contributor
Posts: 12
Registered: ‎03-15-2011
My Device: Tourch OS 6.0
My Carrier: Programmer Beginner

Re: get the dpi screen in webworks

I mean screen size of the device.

Developer
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: get the dpi screen in webworks


garciaf wrote:

I mean screen size of the device.


so you just refer to javascript screen.height and screen.width.

Contributor
Posts: 12
Registered: ‎03-15-2011
My Device: Tourch OS 6.0
My Carrier: Programmer Beginner

Re: get the dpi screen in webworks

Sorry I misunderstood, I meant the size of the device. 

My purpose is to find the physical size of one pixel.