viewfinder bitmaps size
| Fri, 2006-01-20 16:20 | |
|
hej all
I have a strange problem with viewfinder... im making Code: TSize finderSize = KViewFinderSize; ( KViewFinderSize is TSize(176,140) )iCamera->StartViewFinderBitmapsL(finderSize);StartViewFinderBitmapsL() and after i get ViewFinderFrameReady(CFbsBitmap& aFrame) i draw it on the screen (gc.bitblt(...)) and the problem is that on device i can see only a 'corner' of taken bitmap... it seems like phone takes a bitmap of size for example 400x300 and on screen its only left top corner of it (for example 128x128) hope u understand what i meen... So what shall i do to see all bitmap on screen P.S. in emulator the size of aFrame in bitmapready is exacly like view finder size so whats wrong ? Thx for help BG |
|






Forum posts: 141
Do like this,
TRect rect = TRect(0,40,176,184);
TPoint iFinderPosition;//declare it in header file.
iFinderPosition = rect.iTl;
iFinderPosition.iX += (rect.Size().iWidth - finderSize.iWidth)/2;
iFinderPosition.iY += (rect.Size().iHeight - finderSize.iHeight)/2;
//in draw function
gc.BitBlt(iFinderPosition, &aFrame);
regards,
Eswar