uifw/ganes/src/HgVgLetterPopup.cpp
branchRCL_3
changeset 51 fcdfafb36fe7
parent 23 3d340a0166ff
equal deleted inserted replaced
50:a1caeb42b3a3 51:fcdfafb36fe7
   130         iPrevText = 0;
   130         iPrevText = 0;
   131         iPrevText = aText.AllocL();
   131         iPrevText = aText.AllocL();
   132         iDrawBuffer->Clear(iRect.Size(), KRgbBlack);
   132         iDrawBuffer->Clear(iRect.Size(), KRgbBlack);
   133         
   133         
   134         TAknLayoutText layout;
   134         TAknLayoutText layout;
   135         layout.LayoutText(iParentRect, iTextLayout);
   135         layout.LayoutText( TRect(TPoint(0,0), iRect.Size()), iTextLayout);
   136         layout.DrawText(iDrawBuffer->Gc(), aText, ETrue, KRgbWhite);
   136         layout.DrawText(iDrawBuffer->Gc(), aText, ETrue, KRgbWhite);
   137         
   137         
   138 /*        TInt width = iFont->TextWidthInPixels(aText);
   138         iDrawBuffer->GetDrawBufferToVgImage(TRect(TPoint(0,0), iRect.Size()), TPoint(0,0), iLetterImage, VG_A_8);
   139         TInt height = iFont->HeightInPixels();
       
   140         TPoint pos(iRect.Width() / 2 - width / 2, 
       
   141                 iRect.Height() / 2 + height / 2);
       
   142         iDrawBuffer->DrawText(aText, iFont, KRgbWhite, pos);*/
       
   143         iDrawBuffer->GetDrawBufferToVgImage(iRect.Size(), TPoint(0,0), iLetterImage, VG_A_8);
       
   144         }
   139         }
   145     }
   140     }
   146 
   141 
   147 // -----------------------------------------------------------------------------
   142 // -----------------------------------------------------------------------------
   148 // CHgVgPopup::SetTexts()
   143 // CHgVgPopup::SetTexts()
   214 void CHgVgPopup::SetLayouts(const TAknWindowComponentLayout& aPopupLayout, 
   209 void CHgVgPopup::SetLayouts(const TAknWindowComponentLayout& aPopupLayout, 
   215         const TAknTextComponentLayout& aTextLayout, const TRect& aParentRect)
   210         const TAknTextComponentLayout& aTextLayout, const TRect& aParentRect)
   216     {
   211     {
   217     iPopupLayout = aPopupLayout;
   212     iPopupLayout = aPopupLayout;
   218     iTextLayout = aTextLayout;
   213     iTextLayout = aTextLayout;
       
   214     iTextLayout.Setr(0);
   219     iTextLayout.Setl(0);
   215     iTextLayout.Setl(0);
   220     iTextLayout.Sett(0);
   216     iTextLayout.Sett(0);
   221     iParentRect = aParentRect;
   217     iParentRect = aParentRect;
   222     }
   218     }
   223 
   219