Author Topic: the phone's fit  (Read 710 times)

Offline kefeihappy

  • byte
  • *
  • Posts: 11
    • View Profile
the phone's fit
« on: April 01, 2014, 03:28:48 am »
Hello, I need your help!
Is there any way to solve the problem of cell phone screen size fit about JPCT?
eg: The phone's pix  1280 720 ,  such 800 480   so on!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: the phone's fit
« Reply #1 on: April 01, 2014, 07:30:53 am »
....and the problem with this is...? ???

Offline kefeihappy

  • byte
  • *
  • Posts: 11
    • View Profile
Re: the phone's fit
« Reply #2 on: April 01, 2014, 11:18:58 am »
HAHA, I am sorry!
the problem with this was  that! 
I am usiging JPCT to make Android Mobile game, after successively using fb.bit() method to draw the map, i found the position and the size displayed on the screen cannot match with my device resolution. Is there any way to resolve this problem?


Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: the phone's fit
« Reply #3 on: April 01, 2014, 12:06:17 pm »
You don't do your blits in absolute coordinates. You do them relative to the screen size. So if you want to blit something in the first third of the screen, you use framebuffer.getWidth()/3 to get your blit coordinate.
There are other ways for sure, but this is the one I use.