[Trac #1471] Screen resolution development environment

Zarro Boogs per Child bugtracker at laptop.org
Sun May 13 18:39:38 EDT 2007


#1471: Screen resolution development environment
--------------------------------------------------------+-------------------
 Reporter:  lucks                                       |       Owner:  lucks
     Type:  defect                                      |      Status:  new  
 Priority:  normal                                      |   Milestone:       
Component:  kuku-activity                               |     Version:       
 Keywords:  screen resolution transform scale 1200x900  |  
--------------------------------------------------------+-------------------
 The XO screen resolution is 1200x900, which is way to big for a 12" G4
 laptop screen (due to its lower resolution).  We need to code with this in
 mind.  Basically, to develop on personal machines, we should set the
 SCREENRECT to 600x450, and scale everything accordingly.  This means
 scaling down bitmaps, and using relative coordinates and multiplying by
 screen_width, and screen_height.


 Example from kentquirk: The best thing is to do all your screen math
 relative to fullscreen. So instead of positioning at, say (600, 450), you
 store the position as (.5, .5) and then multiply by (SCREENWIDTH,
 SCREENHEIGHT). Then you can test at 800x600 and scale up.

 To scale bitmaps, we can use pygame.transform.scale, and go through at
 startup and scale all your bitmaps by (window_width/1200,
 window_height/900).

 For text make the font size a parameter.

-- 
Ticket URL: <http://dev.laptop.org/ticket/1471>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list