×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    1

    Question CFbsBitGc::BitBlt() a full screen bitmap,but only show a half on real device?

    I use CFbsScreenDevice and CFbsBitGc to draw a bitmap on the screen.It works fine on emulator,but only draws a half of the image on the real device(Nokia5230), is there something i don't considered? my code like this:

    Code:
    User::LeaveIfError(iWsSession.Connect());
    
    iWsScreenDevice = new (ELeave) CWsScreenDevice(iWsSession);
    
    User::LeaveIfError(iWsScreenDevice->Construct());
    
    iFbsScreenDevice = CFbsScreenDevice::NewL(KNullDesC, 
    		iWsScreenDevice->DisplayMode());
    
    User::LeaveIfError(iFbsScreenDevice->CreateContext( iFbsGc ));
    
    iScreenSize = iWsScreenDevice->SizeInPixels();
    
    iFbsGc->Activate(iFbsScreenDevice);
    iFbsGc->Reset();
    
    TRect screenRect(0, 0, iScreenSize.iWidth, iScreenSize.iHeight);
    iFbsGc->SetClippingRect(screenRect);
    //clear the screen
    iFbsGc->Clear(screenRect);
    
    TPoint frameTL(0, 0);
    iFbsGc->BitBlt(frameTL, bitmap);
    
    iFbsScreenDevice->Update();
    
    iWsSession.Flush();
    And i found another post is the same question,but no solution:
    http://discussion.forum.nokia.com/fo...97%AE%E9%A2%98
    Last edited by paulluo; 2010-06-24 at 03:05. Reason: append

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: CFbsBitGc::BitBlt() a full screen bitmap,but only show a half on real device?

    you might want to check iScreenSize.iWidth, iScreenSize.iHeight with AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EApplicationWindow, temp_rect)

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: CFbsBitGc::BitBlt() a full screen bitmap,but only show a half on real device?

    It is unclear what you mean on 'half'.
    - the entire image is shown, but it does not fill the screen? - note that BitBlt does not resize the image (DrawBitmap to a rectangle can do that)
    - the entire screen is filled, but with the upper half of the image? - note that BitBlt does not resize the image (DrawBitmap to a rectangle can do that)
    - half of the screen is filled with the half of the image? - this would be the strange case
    - in the strange case: how does the size of the non-filled screen portion relate to the size of the virtual keyboard (even if it is not visible as I assume)?
    It seems to be a non-GUI code, so AknLayoutUtils might not work.

Similar Threads

  1. Replies: 0
    Last Post: 2009-07-31, 10:18
  2. Show an image full screen
    By jmpep in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-11-02, 19:00
  3. RTSP platformrequest to launch Real Player in full screen??
    By mfggrilli in forum Mobile Java General
    Replies: 2
    Last Post: 2008-03-04, 17:50
  4. Replies: 8
    Last Post: 2007-06-19, 13:30
  5. CWindowGc.BitBlt() bitmap formats
    By doctordwarf in forum Symbian
    Replies: 2
    Last Post: 2003-10-01, 14:38

Posting Permissions

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