tags:

views:

20

answers:

0

Hey, I'm trying to work out how to use canvas in PyS60 on the n95.

I'm attempting to draw a rectangle that will fill the whole screen, but the rectangle seems to get cut off.

This is the code:

import e32, appuifw

#Define the exit function
app_lock=e32.Ao_lock()
def quit():
    app_lock.signal()
appuifw.app.exit_key_handler=quit

canvas=appuifw.Canvas()
appuifw.app.body=canvas
appuifw.app.screen="full"

canvas.rectangle((2,2,238,318), fill=0xCC55EE) #Draws a purple rectangle

app_lock.wait()

The n95 screen is 240x320.

This is the resulting screenshot:

alt text

The strange thing is, on my phones screen it actually appears like this:

(The same but with the bottom section just white)

Any ideas of where I'm going wrong?

I assume I need to somehow hide the softkeys?