日期:2014-05-18 浏览次数:20810 次
Rectangle[] recLeft = { new Rectangle(20,30,60,20), new Rectangle(20,50,60,0), new Rectangle(20,50,60,30), new Rectangle(20,80,60,20), new Rectangle(20,100,60,40), new Rectangle(20,140,60,20) };
int[] rct = { 20, 0, 30, 20, 40, 20 }; Rectangle[] recLeft = new Rectangle[rct.Length]; recLeft[0] = new Rectangle(20, 30, 60, rct[0]); for (int i = 1; i < recLeft.Length; i++) { recLeft[i] = new Rectangle(20, recLeft[i - 1].Y + recLeft[i - 1].Height, 60, rct[i]); }