×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    201

    How to get transparent image on screen

    Hi to all
    I have developed an application in S60 Second edition which will display one small image ( Application Indicator). But my problem is its giving me white square background.

    i have also tried using mask but i m not able to do this.
    Have any one solved it before..
    Because my image doesn't look like professional with white background when i change the themes.
    Thank you very much...

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to get transparent image on screen

    if you are trying to have a transparent window, then you are out of luck since S60 does not support transparent windows.

  3. #3
    Regular Contributor
    Join Date
    May 2009
    Posts
    201

    Re: How to get transparent image on screen

    Thank you for your quick reply.
    So is it possible in 3rd edition or later versions ....Because i m going to do in almost all editions.
    Thank you again

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to get transparent image on screen

    which part of S60 does not support transparent windows you did not understand ?

  5. #5
    Regular Contributor
    Join Date
    May 2009
    Posts
    201

    Re: How to get transparent image on screen

    Quote Originally Posted by symbianyucca View Post
    which part of S60 does not support transparent windows you did not understand ?
    That means s60 at all not suported in any editions ?

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to get transparent image on screen

    ok, you are getting the answer, it really says that S60 does not support transparent windows, so maybe I indeed do mean that..

  7. #7
    Regular Contributor
    Join Date
    May 2009
    Posts
    201

    Re: How to get transparent image on screen

    Quote Originally Posted by symbianyucca View Post
    ok, you are getting the answer, it really says that S60 does not support transparent windows, so maybe I indeed do mean that..
    Thank you very much..
    one more question
    is there any way to paint that white background with nearer color or window color?

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to get transparent image on screen

    that would be nearly pointless, since the background is hardly ever solid, most often it is take from theme. anyway you could always try taking a screenshot before you show your stuff, and use the area of it where your window is as a background.. Anyway, you can not re-fresh that, since any screenshot when you are showing your stuff would include your window on it as well...

  9. #9
    Regular Contributor
    Join Date
    May 2009
    Posts
    201

    Re: How to get transparent image on screen

    Quote Originally Posted by symbianyucca View Post
    that would be nearly pointless, since the background is hardly ever solid, most often it is take from theme. anyway you could always try taking a screenshot before you show your stuff, and use the area of it where your window is as a background.. Anyway, you can not re-fresh that, since any screenshot when you are showing your stuff would include your window on it as well...
    Thank you for your guide.

  10. #10
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: How to get transparent image on screen

    Hi,

    I am not sure about the link but you can try at once
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  11. #11
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to get transparent image on screen

    Yep, you can try it out, but I would check what the error code is that the SetTransparencyFactor will return, sofar I have seen it return -5 in S60 devices, though gotta admit that i have not run that code with 9.4, thus might be worth of trying..

  12. #12
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: How to get transparent image on screen

    Quote Originally Posted by kkrish View Post
    I am not sure about the link but you can try at once
    If I remember correctly, RWindow::SetTransparencyFactor() not supported in S60, but works in UIQ3.

  13. #13
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to get transparent image on screen

    Quote Originally Posted by A.A.M. View Post
    If I remember correctly, RWindow::SetTransparencyFactor() not supported in S60, but works in UIQ3.
    That's What my memory tells me also, anyway, somebody could check and verify teh behaviour on the 9.4, never know, maybe something has changed, though I would assume that it is still not supported..

  14. #14
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: How to get transparent image on screen

    Interesting results after testing this code on S60 3rd ed FP1 & FP2 devices:
    Code:
    void MyView::ConstructL()
    {
           CreateWindowL();  //
          
           .........  
    }  
     
    void MyView::Draw(const TRect& aRect) const
    {
    	// Get the standard graphics context
    	CWindowGc& gc = SystemGc();
    	
    	TRgb b(255, 0, 0);
    	b.SetAlpha(100);  
    	Window().SetTransparencyFactor(b);
    	// Gets the control's extent
    	TRect drawRect(Rect());
    	gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    	gc.SetBrushColor(b);
     
    	// Clears the screen
    	gc.Clear(Rect());
     
    }
    The same test app running on

    - S60 3rd ed FP1 device


    - S60 3rd ed FP2 device


    Looks like RWindow::SetTransparencyFactor() works.

  15. #15
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: How to get transparent image on screen

    Wow, thanks A.A.M., I stand corrected.. That's actually really nice thing to have..

Similar Threads

  1. draw large image on screen and scroll
    By vinaykk in forum Symbian User Interface
    Replies: 9
    Last Post: 2009-06-10, 08:00
  2. display an image in full screen
    By letronje in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2007-01-31, 05:00
  3. my Alert Image is out of the screen
    By romainbaudet in forum Mobile Java General
    Replies: 3
    Last Post: 2005-04-12, 23:02
  4. Is screen capture image making possible?
    By MobileVisuals in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2005-04-08, 12:37
  5. transparent image draw dont work
    By pekkert in forum Mobile Java General
    Replies: 0
    Last Post: 2003-04-23, 09:48

Posting Permissions

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