コード例 #1
0
ファイル: Renderer.cs プロジェクト: kutselabskii/Citrus
 public static void SetScissorState(ScissorState value, bool intersectWithCurrent = false)
 {
     if (intersectWithCurrent && scissorState.Enable && value.Enable)
     {
         value.Bounds = (WindowRect)IntRectangle.Intersect((IntRectangle)value.Bounds, (IntRectangle)scissorState.Bounds);
     }
     ScissorState = value;
 }
コード例 #2
0
ファイル: Frame.cs プロジェクト: klenin/Citrus
 private bool IntersectRectangles(WindowRect a, WindowRect b, out WindowRect r)
 {
     r = (WindowRect)IntRectangle.Intersect((IntRectangle)a, (IntRectangle)b);
     return(r.Width > 0 && r.Height > 0);
 }