×

Discussion Board

Results 1 to 8 of 8

Thread: (UI) Wishlist?

Hybrid View

  1. #1
    Registered User
    Join Date
    Dec 2004
    Location
    Groningen, Netherlands
    Posts
    10

    Lightbulb (UI) Wishlist?

    After two weeks of playing with Python I feel finally that developing a Symbian app is easy. Being a C/Java programmer/teacher I must confess Python is really a wonderful and powerful language and it invites people to program. Finally, no rss, mmp, buggy software and inflexible compilers anymore ;-)

    However, on the other hand, looking at the OPL sourceforge project and .Net CF on that other platform ;-) I feel something is fundamentally lacking in this port: good direct graphics/canvas programming. Has anyone starting looking into extending Python in this area?

    Are there any other UI wishes amongst you out there?

  2. #2
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    76
    What kind of features are you interested in for graphics/canvas work? And are there any existing Python graphics packages that you already work with?

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Finland
    Posts
    4
    Originally posted by eriksmartt
    What kind of features are you interested in for graphics/canvas work?
    I'm not the original poster but I'd like to say something about this subject.

    At the moment I have an idea for a little program that would fetch some data from an internet site and present it as well as possible given the screen size. The optimal situation would be to use the whole screen and both custom font and font rendering. I am not into speed so almost any way to put pixels on the screen is acceptable.

    For another little project I would need sound for alerting or a way trigger the "normal" alert on the phone. Also sound input and/or very limited speech-to-text could be useful.

    These things are probably trivial with a c++ module, but unfortunately I am not familiar with Symbian programming. Is the SDK only for Windows or is it possible to work with OS X (or Linux)?

  4. #4
    Registered User
    Join Date
    Dec 2004
    Location
    Groningen, Netherlands
    Posts
    10

    Just like in J2ME...

    Originally posted by eriksmartt
    What kind of features are you interested in for graphics/canvas work? And are there any existing Python graphics packages that you already work with?
    I have no experience with Python GUI programming but I'm aware of the existence of tinker (?)and tcl stuff. What I just want are drawing capabilities like in J2ME or OPL: drawing bitmaps/gifs/etc, lines, boxes etc.

    I personally find the solution of calling a content handler when a gif or a different format is to be shown not always the most apropriate solution.

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    7
    PIL (Python Imaging Library) is the standard graphics library in the Python world. It's available here:

    http://www.pythonware.com/products/pil/

    It's very easy to use. Making a thumbnail from an image is as simple as this:

    import Image

    im = Image.open('image.jpg')
    tn = im.resize((80, 60), Image.ANTIALIAS)
    tn.save('thumbnail.jpg')

    You can also draw an image from scratch:

    import Image, ImageDraw

    im = Image.new('RGB', (120, 80))
    dr = ImageDraw.Draw(im)
    dr.rectangle((0,0,40,80), fill=0xff0000)
    dr.rectangle((40,0,80,80), fill=0xffffff)
    dr.rectangle((80,0,120,80), fill=0x0000ff)
    im.save('frenchflag.bmp')

    It would be nice to have it on Series 60, maybe a limited subset or a similar API for the existing graphics libraries of the platform.

  6. #6
    Registered User
    Join Date
    Dec 2004
    Posts
    18

    canvas

    Originally posted by eriksmartt
    What kind of features are you interested in for graphics/canvas work? And are there any existing Python graphics packages that you already work with?
    I personally like and use VPYTHON:

    http://vpython.org

    on the desktop. On a small device I would like to have some basic plotting functionalities which - for example - gnuplot provides. Alternatively SVG graphics would suffice for many other purposes.

  7. #7
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Bangkok, Thailand
    Posts
    148

    J2ME equivalent

    Many developers are familiar with what's available in J2ME. It may be a good idea to have the same API which will aid migration from J2ME.

    Python GUI API on big screen may not match well with mobile phone screen. We need a strip down version.

    Another approach could be simply give a thin layer to Symbain C++ UI API. Someone will develop a good python API on top of that. Then we rewrite it in C++ for performace. (But flexibility is more important initially)

  8. #8
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    76

    Re: J2ME equivalent

    Originally posted by korakotc
    Another approach could be simply give a thin layer to Symbain C++ UI API. Someone will develop a good python API on top of that. Then we rewrite it in C++ for performace. (But flexibility is more important initially)
    This is my thinking as well. There are a number of existing Python packages for screen drawing, but I don't think there is a single one that really owns the space. Given that, I'm guessing that Python developers are learning new graphics API's all the time, and probably changing from time to time based on project needs.

    Wrapping the native drawing API's means you'll have to learn something new and specific to Series 60 (for now), but the operations should be fast.

Posting Permissions

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