本文整理汇总了C++中TRect::Resize方法的典型用法代码示例。如果您正苦于以下问题:C++ TRect::Resize方法的具体用法?C++ TRect::Resize怎么用?C++ TRect::Resize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TRect
的用法示例。
在下文中一共展示了TRect::Resize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MsgDataPane
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;
}
示例2: TestUnion
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();
}