• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Canvas re sizing and repainting

 
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, i am developing an application which displays non english characters using an image. The repaint is done only to the part of the canvas, so that the existing characters drawn earlier remain to unchanged. Some times the existing characters gets cleared, but thats some times, any idea why this is happening. My second question is how can i make the canvas bigger once it exceeds the size of the display so that the user can scroll down and continue typing? Thanks alot in advance. Anticipating a quick reply...
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you could consider using the LayerManager
in the MIDP Game classes. It allows you to set a view port
over an area that may be bigger than the screen.

You can define a Sprite from an image and then add it
to a LayerManager. I am not sure if it will solve your problem but it may be worth checking it out. Check the MIDP 2.0 documentation for details.

It may also be easier to work with GameCanvas rather than Canvas, which
is a bit "funny" in terms of repaint behaviour. At least GameCanvas (in theory) ensures that when you call flushGraphics() the screen gets updated
synchronously.

PS: Ransinka, I am glad to see you're actively developing using J2ME ...
[ March 31, 2006: Message edited by: Eduardo Marques ]
 
Your mother is a hamster and your father smells of tiny ads!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic