Example #1
0
 //============================================================
 // <T>构造整数矩形。</T>
 //
 // @param location 位置
 // @param size 大小
 //============================================================
 public SIntRectangle(SIntPoint2 location, SIntSize2 size)
 {
     Left   = location.X;
     Top    = location.Y;
     Width  = size.Width;
     Height = size.Height;
 }
Example #2
0
 //============================================================
 // <T>接收尺寸对象。</T>
 //
 // @param size 尺寸对象
 // @param scale 缩放
 //============================================================
 public void Assign(SIntSize2 size, float scale)
 {
     if (size != null)
     {
         Width  = (int)(size.Width * scale);
         Height = (int)(size.Height * scale);
     }
 }
Example #3
0
 //============================================================
 // <T>内部最大化。</T>
 //
 // @param size 尺寸
 //============================================================
 public void InnerMax(SIntSize2 size)
 {
     if (Width < size.Width)
     {
         Width = size.Width;
     }
     if (Height < size.Height)
     {
         Height = size.Height;
     }
 }