×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Arrow [announce] fgimage for 3rd

    hello ,

    Here's an old module from Simo Salminen but adapted to 3rd phone
    This module allow to display splash screen anywhere of any size.
    I only add a wrapper class splash in this version.

    Code:
    #
    # Text is unreadable because of scallable UI problem !
    #
    from fgimage import *
    import graphics
    import sysinfo
    import e32
    w,h=sysinfo.display_pixels()
    
    myimage = graphics.Image.new((w,h/4))
    S=Splash(myimage)
    S.img.clear((102,0,255))
    S.img.text((5,30),u' A cool splash screen !',(255,0,0))
    S.img.rectangle((0,0,S.img.size[0],S.img.size[1]),(204,0,153),width=3)
    S.show((0,75))
    e32.ao_sleep(5)
    S.hide()
    PS : Nokia has release a similar but more powerful module topwindow since 1.3.11 PyS60


    links :
    fgimage for 2nd phone with source code
    fgimage v1.1 for 3nd phone
    fgimage v1.1 unsigned for poweruser
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  2. #2
    Registered User
    Join Date
    Jan 2007
    Posts
    24

    Re: [announce] fgimage for 3rd

    I could only find the source code for fgimage for 2nd. Would you mind sharing the source code for fgimage for 3rd, too?

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    17

    Re: [announce] fgimage for 3rd

    fgimage source code:

    import e32

    if e32.s60_version_info>=(3,0):
    import imp
    _fgimage = imp.load_dynamic('_fgimage', 'c:\\sys\\bin\\_fgimage.pyd')

    else:
    import _fgimage

    del e32, imp #remove unnecessary names from namespace
    from _fgimage import *
    del _fgimage

    #
    # code wrapper
    #

    import fgimage

    class Splash:
    def __init__(self,img=None):
    self.fgi= FGImage()
    self.img = img

    def hide(self):
    return self.fgi.unset()

    def show(self,xy,image=None):
    if image:
    return self.fgi.set(xy[0],xy[1],image._bitmapapi())
    else:
    return self.fgi.set(xy[0],xy[1],self.img._bitmapapi())

Similar Threads

  1. [announce] sysagent module
    By cyke64 in forum Symbian
    Replies: 7
    Last Post: 2009-01-28, 12:52
  2. [announce] uitricks module
    By cyke64 in forum Symbian
    Replies: 25
    Last Post: 2008-11-13, 05:42
  3. Replies: 30
    Last Post: 2008-08-23, 19:52
  4. Replies: 1
    Last Post: 2006-11-23, 17:57
  5. Replies: 0
    Last Post: 2006-05-18, 19:14

Posting Permissions

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