EXPORT_C TRect MsgEditorCommons::MsgDataPane() { TRect msgMainPane = MsgEditorCommons::MsgMainPane(); #ifdef RD_SCALABLE_UI_V2 msgMainPane.Move( -msgMainPane.iTl ); #endif // RD_SCALABLE_UI_V2 // TAknLayoutRect msgDataLayout; // msgDataLayout.LayoutRect( // msgMainPane, // AknLayoutScalable_Apps::msg_data_pane().LayoutLine() ); // // return msgDataLayout.Rect(); msgMainPane.Move(0,3); msgMainPane.Resize(-10,-3); return msgMainPane; }
void TestRRegion::TestUnion() { RRegion rgn1,rgn2,rgn3,tmp_rgn; TRect bounds, rgn1Bounds; TUint index; // Test RRegion (always has a dynamic buffer). rgn1.AddRect(xrect); if (!rgn1.IsEmpty()) { for(index=0;index<(sizeof(rect)/sizeof(rect[0]));index++) tmp_rgn.AddRect(rect[index]); test(tmp_rgn.Count()==4); rgn1.Union(tmp_rgn); test(rgn1.Count()==7); rgn1Bounds = rgn1.BoundingRect(); rgn2.Copy(rgn1); rgn2.Offset(3,5); rgn3.Copy(rgn1); rgn3.Offset(5,7); rgn3.Union(rgn2); test(rgn3.Count()==17); bounds=rgn1.BoundingRect(); rgn1.Union(rgn2); bounds.Resize(3,5); test(rgn1.BoundingRect()==bounds); rgn1Bounds.Shrink(3,5); rgn1Bounds.Resize(8,12); test(rgn3.BoundingRect()==rgn1Bounds); } rgn1.Close(); rgn2.Close(); rgn3.Close(); tmp_rgn.Close(); RRegionBuf<8> rgnBuf1,rgnBuf2,rgnBuf3,tmp_rgnBuf; // Test RRegionBuf (can transform from using a static to using a dynamic buffer). rgnBuf1.AddRect(xrect); if (!rgnBuf1.IsEmpty()) { for(index=0;index<(sizeof(rect)/sizeof(rect[0]));index++) tmp_rgnBuf.AddRect(rect[index]); test(tmp_rgnBuf.Count()==4); rgnBuf1.Union(tmp_rgnBuf); test(rgnBuf1.Count()==7); rgn1Bounds = rgnBuf1.BoundingRect(); rgnBuf2.Copy(rgnBuf1); rgnBuf2.Offset(3,5); rgnBuf3.Copy(rgnBuf1); rgnBuf3.Offset(5,7); rgnBuf3.Union(rgnBuf2); test(rgnBuf3.Count()==17); bounds=rgnBuf1.BoundingRect(); rgnBuf1.Union(rgnBuf2); bounds.Resize(3,5); test(rgnBuf1.BoundingRect()==bounds); rgn1Bounds.Shrink(3,5); rgn1Bounds.Resize(8,12); test(rgnBuf3.BoundingRect()==rgn1Bounds); } rgnBuf1.Close(); rgnBuf2.Close(); rgnBuf3.Close(); tmp_rgnBuf.Close(); }