Tinkr2/4.2/AphelionCore/AphelionCore/Core/Core.cs
/// <summary>
/// Automatically sets clipping region for a control.
/// </summary>
/// <param name="control">Control to clip for</param>
/// <param name="x">X of control</param>
/// <param name="y">Y of control</param>
/// <param name="width">Width of control</param>
/// <param name="height">Height of control</param>
Automatically sets clipping region for a control.
Automatically sets clipping region for a control .
public static void ClipForControl(IControl control, int x, int y, int width, int height)
      {
         var area = new rect(x, y, width, height);
         rect r;
         if (control.Parent == null)
         {
            r = new rect(0, 0, _instance._sW, _instance._sH);
         }
         else
         {
            IControl c = control.Parent;
            r = c.ScreenBounds;
         }
         r = rect.Intersect(r, area);
         _instance._screen.SetClippingRectangle(r.X, r.Y, r.Width, r.Height);
      }
public static void ClipForControl ( IControl control , int x , int y , int width , int height ) { var area = new rect ( x , y , width , height ) ; rect r ; if ( control . Parent == null ) { r = new rect ( 0 , 0 , _instance . _sW , _instance . _sH ) ; } else { IControl c = control . Parent ; r = c . ScreenBounds ; } r = rect . Intersect ( r , area ) ; _instance . _screen . SetClippingRectangle ( r . X , r . Y , r . Width , r . Height ) ; }
Automatically sets clipping region for a control.
Automatically sets clipping region for a control .
control
IControl
Control to clip for
Control to clip for
x
int
X of control
X of control
y
int
Y of control
Y of control
width
int
Width of control
Width of control
height
int
Height of control
Height of control