コード例 #1
0
 public Clip SetRegion(Clip region, bool updateSize)
 {
     if (region != null)
     {
         if (updateSize)
         {
             this._displayWidth  = region.GetRegionWidth();
             this._displayHeight = region.GetRegionHeight();
         }
         else
         {
             this._displayWidth  = region._displayWidth;
             this._displayHeight = region._displayHeight;
         }
         SetRegion(region._offX, region._offY, region._widthRatio, region._heightRatio);
     }
     return(this);
 }
コード例 #2
0
 public Clip SetRegion(Clip region, int x, int y, int width, int height, bool updateSize)
 {
     if (region != null)
     {
         if (updateSize)
         {
             this._displayWidth  = region.GetRegionWidth();
             this._displayHeight = region.GetRegionHeight();
         }
         else
         {
             this._displayWidth  = region._displayWidth;
             this._displayHeight = region._displayHeight;
         }
         SetRegion(region.GetRegionX() + x, region.GetRegionY() + y, width, height);
     }
     else
     {
         SetRegion(x, y, width, height);
     }
     return(this);
 }