コード例 #1
0
ファイル: ScreenRectangle.cs プロジェクト: SXgwhittom/White
 internal FrameRectangle(Rect boundingRectangle)
 {
     leftBorder = new ScreenRectangle(new Rect(boundingRectangle.X - width, boundingRectangle.Y - width, width, boundingRectangle.Height + 2*width));
     topBorder = new ScreenRectangle(new Rect(boundingRectangle.X, boundingRectangle.Y - width, boundingRectangle.Width, width));
     rightBorder = new ScreenRectangle(new Rect(boundingRectangle.X + boundingRectangle.Width, boundingRectangle.Y - width, width, boundingRectangle.Height + 2*width));
     bottomBorder = new ScreenRectangle(new Rect(boundingRectangle.X, boundingRectangle.Y + boundingRectangle.Height, boundingRectangle.Width, width));
     rectangles = new ScreenRectangle[] { leftBorder, topBorder, rightBorder, bottomBorder };
 }
コード例 #2
0
ファイル: ScreenRectangle.cs プロジェクト: yonglehou/White
 internal FrameRectangle(Rect boundingRectangle)
 {
     leftBorder   = new ScreenRectangle(new Rect(boundingRectangle.X - width, boundingRectangle.Y - width, width, boundingRectangle.Height + 2 * width));
     topBorder    = new ScreenRectangle(new Rect(boundingRectangle.X, boundingRectangle.Y - width, boundingRectangle.Width, width));
     rightBorder  = new ScreenRectangle(new Rect(boundingRectangle.X + boundingRectangle.Width, boundingRectangle.Y - width, width, boundingRectangle.Height + 2 * width));
     bottomBorder = new ScreenRectangle(new Rect(boundingRectangle.X, boundingRectangle.Y + boundingRectangle.Height, boundingRectangle.Width, width));
     rectangles   = new ScreenRectangle[] { leftBorder, topBorder, rightBorder, bottomBorder };
 }
コード例 #3
0
ファイル: ScreenRectangle.cs プロジェクト: EDOlsson/White
 internal FrameRectangle(Color color, Rect boundingRectangle)
 {
     // Using 4 rectangles to display each border
     var leftBorder = new ScreenRectangle(color, new Rect(boundingRectangle.X - Width, boundingRectangle.Y - Width, Width, boundingRectangle.Height + 2 * Width));
     var topBorder = new ScreenRectangle(color, new Rect(boundingRectangle.X, boundingRectangle.Y - Width, boundingRectangle.Width, Width));
     var rightBorder = new ScreenRectangle(color, new Rect(boundingRectangle.X + boundingRectangle.Width, boundingRectangle.Y - Width, Width, boundingRectangle.Height + 2 * Width));
     var bottomBorder = new ScreenRectangle(color, new Rect(boundingRectangle.X, boundingRectangle.Y + boundingRectangle.Height, boundingRectangle.Width, Width));
     rectangles = new[] { leftBorder, topBorder, rightBorder, bottomBorder };
 }
コード例 #4
0
        internal FrameRectangle(Color color, Rect boundingRectangle)
        {
            // Using 4 rectangles to display each border
            var leftBorder   = new ScreenRectangle(color, new Rect(boundingRectangle.X - Width, boundingRectangle.Y - Width, Width, boundingRectangle.Height + 2 * Width));
            var topBorder    = new ScreenRectangle(color, new Rect(boundingRectangle.X, boundingRectangle.Y - Width, boundingRectangle.Width, Width));
            var rightBorder  = new ScreenRectangle(color, new Rect(boundingRectangle.X + boundingRectangle.Width, boundingRectangle.Y - Width, Width, boundingRectangle.Height + 2 * Width));
            var bottomBorder = new ScreenRectangle(color, new Rect(boundingRectangle.X, boundingRectangle.Y + boundingRectangle.Height, boundingRectangle.Width, Width));

            rectangles = new[] { leftBorder, topBorder, rightBorder, bottomBorder };
        }