×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    1

    Canvas and screen large

    Hello,sorry my english.
    now,i have some code
    Code:
    # -*- coding:utf-8 -*-
    import appuifw, e32, key_codes, graphics
    def f_exit():
        app_lock.signal()
    
    canvas = appuifw.Canvas()
    appuifw.app.body = canvas
    
    canvas.clear((216,216,216))
    canvas.text((20,20),"Hello".decode('utf-8'),fill=(0,0,0),font=('normal',18,graphics.FONT_ANTIALIAS))
    canvas.text((20,100),"Hello".decode('utf-8'),fill=(0,0,0),font=('normal',18,graphics.FONT_ANTIALIAS))
    
    appuifw.app.exit_key_handler = f_exit
    app_lock = e32.Ao_lock()
    app_lock.wait()
    it's working ok,but i add a new line :
    Code:
    appuifw.app.screen = "large"
    canvas = appuifw.Canvas()
    now,no error message popup,but i can't see first "Hello" string.
    i change code to :
    Code:
    appuifw.app.screen = "full"
    oh,i see it.
    but why? must on normal or full, why not working on large?

  2. #2
    Regular Contributor
    Join Date
    Dec 2007
    Location
    Tempe, AZ
    Posts
    411

    Re: Canvas and screen large

    Hi gyro@163.com ,
    Welcome to Forum first of all,
    I don't see any change you told about in both cases i see two "Hello" no problem at all

    Codes were

    Code:
    # -*- coding:utf-8 -*-
    import appuifw, e32, key_codes, graphics
    def f_exit():
        app_lock.signal()
    
    canvas = appuifw.Canvas()
    appuifw.app.body = canvas
    appuifw.app.screen = "full"
    
    canvas.clear((216,216,216))
    canvas.text((20,20),"Hello".decode('utf-8'),fill=(0,0,0),font=('normal',18,graphics.FONT_ANTIALIAS))
    canvas.text((20,100),"Hello".decode('utf-8'),fill=(0,0,0),font=('normal',18,graphics.FONT_ANTIALIAS))
    
    appuifw.app.exit_key_handler = f_exit
    app_lock = e32.Ao_lock()
    app_lock.wait()
    and for "large"

    Code:
    # -*- coding:utf-8 -*-
    import appuifw, e32, key_codes, graphics
    def f_exit():
        app_lock.signal()
    
    canvas = appuifw.Canvas()
    appuifw.app.body = canvas
    appuifw.app.screen = "large"
    
    canvas.clear((216,216,216))
    canvas.text((20,20),"Hello".decode('utf-8'),fill=(0,0,0),font=('normal',18,graphics.FONT_ANTIALIAS))
    canvas.text((20,100),"Hello".decode('utf-8'),fill=(0,0,0),font=('normal',18,graphics.FONT_ANTIALIAS))
    
    appuifw.app.exit_key_handler = f_exit
    app_lock = e32.Ao_lock()
    app_lock.wait()
    IDEAS is all they need but still they think only Genius can give them that.

Similar Threads

  1. Canvas bigger than screen
    By antonio5982 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2007-10-16, 17:36
  2. Using full screen for canvas class in MIDP 1.0
    By remondo in forum Mobile Java Games
    Replies: 5
    Last Post: 2006-05-19, 08:12
  3. Major problem with delegation to Canvas
    By bartekn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2003-10-08, 17:46
  4. About entering a text in Canvas Screen
    By Supraja in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2003-06-19, 15:46
  5. Should I extend Canvas or Screen?
    By jigsaw_echo in forum Mobile Java General
    Replies: 2
    Last Post: 2002-12-27, 07:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×