×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    56

    scrolled info in image

    hey i use canvas and image in it to output text for the user (since appuifw.Text is editable.
    i want to do if the text reach the end of the screen to delete old lines from the top and move up everything then i can put more text on the screen.
    i use something like:
    def msg(text):
    global textloc
    textloc=(textloc[0],textloc[1]+15)
    image.text(textloc,unicode(text), (0,0,0), (u'Series 60 J', None))
    canvas.blit(image)

    to output my text.
    any hints how to do what i want ?

  2. #2
    Registered User
    Join Date
    Mar 2008
    Posts
    2

    Re: scrolled info in image

    Hi, it's a bit hard to understand your question. However if you want to clear a canvas or image you can use the .clear() and if you want to measure text in pixels there is the .measure text().
    See more in PyS60 reference

  3. #3
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Re: scrolled info in image

    @roidayan : Please use the CODE tab (#) to post any code next time. This retains the indentations in your code and makes easier for others to follow up.
    Pankaj Nathani
    www.croozeus.com

  4. #4
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: scrolled info in image

    Quote Originally Posted by roidayan View Post
    hey i use canvas and image in it to output text for the user (since appuifw.Text is editable.
    i want to do if the text reach the end of the screen to delete old lines from the top and move up everything then i can put more text on the screen.
    i use something like:
    def msg(text):
    global textloc
    textloc=(textloc[0],textloc[1]+15)
    image.text(textloc,unicode(text), (0,0,0), (u'Series 60 J', None))
    canvas.blit(image)

    to output my text.
    any hints how to do what i want ?
    Text component might be bit too inflexible for this. Try use TextWrapper class (metioned earlier in forum topics). You also might want to double buffer output using Image to prevent screen flickering.
    Mikko Ohtamaa

    http://mfabrik.com
    http://blog.mfabrik.com

  5. #5
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    56

    Re: scrolled info in image

    what i ment is.
    i have an Image object i use to output text. every line i increase y vector but when i reach the end of the screen
    i want the upper lines to clear out and all other lines below the lines i cleared to like go up.
    i guess i need to clear the entire image and output the text again ?

    what did you mean about double buffer using image ? i didnt understand. i use image object inside canvas.

Similar Threads

  1. Replies: 8
    Last Post: 2007-05-26, 10:30
  2. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  3. Problem executing Maze Racer
    By IFtechsupport in forum Mobile Java Games
    Replies: 1
    Last Post: 2006-09-22, 17:18
  4. how to cut some part of Image
    By mshouab in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-08-04, 09:05
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

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