×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Question Problem: redraw to the screen outside of applications framework

    Hello,

    I am trying to draw texts and images without using coecontrol (outside of standard UI).

    here I am using the WIKI code for doing it:
    http://wiki.forum.nokia.com/index.ph...tion_framework
    http://wiki.forum.nokia.com/index.ph...ndow_server%3F

    But I have problem with Redraw function.

    the Window can't be cleared when I call the following code in Draw() function:

    (Draw() function is called before set RedrawReady(&iStatus)
    Code:
      iGc->Activate(*iWindow);
      TRect DrwRect(TPoint(0,0), TSize(175, 80));
      iWindow->BeginRedraw();
      iGc->Clear(DrwRect);
    ......
      iWindow->EndRedraw();
      iGc->Deactivate();
      iSession->Flush();
    But if I use

    Code:
      iWindow->SetVisible(EFalse);
      iWindow->SetVisible(ETrue);
      iSession->Flush();
    ,then the screen is cleared and updated.


    My question is, how to clear a TRect of a window in Draw() function here?


    Thanks in advanced

    Regards,


    Pai
    Symbian && Android && iPhoneOS

  2. #2
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Re: Problem: redraw to the screen outside of applications framework

    Hello,


    I have noticed now, the problem exists only for a transparency background colour.


    I am using TRgb::SetAlpha(1) to set the background color with black, and in this way I can get a transparency background.

    But the CWindowGc::Clear() doesn't work well for transparency colour.


    Regards,


    Pai
    Symbian && Android && iPhoneOS

  3. #3
    Super Contributor
    Join Date
    Sep 2007
    Posts
    1,005

    Re: Problem: redraw to the screen outside of applications framework

    Quote Originally Posted by paipeng View Post
    Hello,


    I have noticed now, the problem exists only for a transparency background colour.


    I am using TRgb::SetAlpha(1) to set the background color with black, and in this way I can get a transparency background.

    But the CWindowGc::Clear() doesn't work well for transparency colour.


    Regards,


    Pai
    if u set the pen to null pen, SetAlpha() function will not have any effect.

    i.e

    TRgb col2 = KRgbYellow;
    col2.SetAlpha(75);
    gc.SetBrushColor(col2);
    gc.SetPenStyle(CGraphicsContext::ENullPen);
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    gc.DrawRect(rect);

    then, when u clear the screen, try set pen and/or brush to solid,
    and see if it helps. frankly, that's just my idea, haven't try at all.

Similar Threads

  1. Splash Screen problem
    By damien_a in forum Mobile Java General
    Replies: 2
    Last Post: 2008-03-10, 07:03
  2. Webservice framework authentication problem
    By niemin78 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-08-22, 10:57
  3. Screen bottom problem
    By monur in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-04-18, 14:04
  4. Applications crashing in Cingular-branded 6682. Feedback appreciated.
    By Razor1973 in forum General Development Questions
    Replies: 3
    Last Post: 2006-01-27, 13:11
  5. help:nokia7610 screen problem!
    By superpi in forum General Development Questions
    Replies: 1
    Last Post: 2005-08-29, 18:26

Posting Permissions

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