javauis/mmapi_qt/baseline/src/cmmacanvasdisplay.cpp
changeset 56 abc41079b313
parent 49 35baca0e7a2e
equal deleted inserted replaced
50:023eef975703 56:abc41079b313
   168 {
   168 {
   169     LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL +");
   169     LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL +");
   170     iFullScreen = aFullScreen;
   170     iFullScreen = aFullScreen;
   171     if (iContainerVisible)
   171     if (iContainerVisible)
   172     {
   172     {
       
   173         LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL widht=%d height=%d", iFullScreenSize.iWidth,
       
   174              iFullScreenSize.iHeight);
   173         RemoveClippingRegion();
   175         RemoveClippingRegion();
   174 
   176         LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL widht=%d height=%d", iFullScreenSize.iWidth,
       
   177              iFullScreenSize.iHeight);
       
   178         LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL::iSourceSize widht=%d height=%d", iSourceSize.iWidth,
       
   179              iSourceSize.iHeight);
   175         if (aFullScreen)
   180         if (aFullScreen)
   176         {
   181         {
   177             // use new scaled rect
   182             // use new scaled rect
   178             // iWindow->SetDrawRect(ScaleToFullScreen(fullScreenSize, iSourceSize));
   183             // iWindow->SetDrawRect(ScaleToFullScreen(fullScreenSize, iSourceSize));
   179             iWindow->SetDrawRectThread(ScaleToFullScreen(iFullScreenSize, iSourceSize));
   184             LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL -  true scale to fullscreen");
       
   185             iWindow->SetDrawRect(ScaleToFullScreen(iFullScreenSize, iSourceSize));
   180         }
   186         }
   181         else
   187         else
   182         {
   188         {
   183             // use size set from java
   189             // use size set from java
   184             //iWindow->SetDrawRect(iUserRect);
   190             LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL -  false - draw the user rect set previously");
   185             iWindow->SetDrawRectThread(iUserRect);
   191             LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL iUserRect = (%d,%d) ",iUserRect.Width(),iUserRect.Height());
       
   192             iWindow->SetDrawRect(iUserRect);
   186         }
   193         }
   187 
   194 
   188         AddClippingRegion();
   195         AddClippingRegion();
   189     }
   196     }
   190     LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL +");
   197     LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL -");
   191 }
   198 }
   192 
   199 
   193 void CMMACanvasDisplay::SetWindowL(MMMADisplayWindow* aWindow)
   200 void CMMACanvasDisplay::SetWindowL(MMMADisplayWindow* aWindow)
   194 {
   201 {
   195     LOG(EJavaMMAPI, EInfo, "CMMACanvasDisplay::SetWindowL");
   202     LOG(EJavaMMAPI, EInfo, "CMMACanvasDisplay::SetWindowL");
   268     LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay: BoundRect() co-ordinate of topleftcorner is x = %d,y =%d",xcoordinate,ycoordinate);
   275     LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay: BoundRect() co-ordinate of topleftcorner is x = %d,y =%d",xcoordinate,ycoordinate);
   269     LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay: BoundRect() size of bound rect is width = %d,height =%d",width,height);
   276     LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay: BoundRect() size of bound rect is width = %d,height =%d",width,height);
   270     TPoint topleft(xcoordinate,ycoordinate);
   277     TPoint topleft(xcoordinate,ycoordinate);
   271     TSize rectsize(width,height);
   278     TSize rectsize(width,height);
   272     TRect boundRect(topleft,rectsize);
   279     TRect boundRect(topleft,rectsize);
   273     iJni->ReleaseIntArrayElements(javaboundinfoarr, nativeboundinfoarr, JNI_COMMIT);
   280     iJni->ReleaseIntArrayElements(javaboundinfoarr, nativeboundinfoarr,0);
   274     LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::BoundRect -");
   281     LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::BoundRect -");
   275     return boundRect;
   282     return boundRect;
   276 }
   283 }
   277 
   284 
   278 // ask java side peer about the container rect size
   285 // ask java side peer about the container rect size