コード例 #1
0
 public void Draw(DrawingContext2D context)
 {
     if (SelectionBoxVisible)
     {
         context.FillRectangle(SelectionRectangle, new ColorRgbaF(1, 1, 1, 0.1f));
         context.DrawRectangle(SelectionRectangle.ToRectangleF(), ColorRgbaF.Black, 2);
     }
 }
コード例 #2
0
ファイル: SelectionGui.cs プロジェクト: vtsingaras/OpenSAGE
        public void Draw(DrawingContext2D context, CameraComponent camera)
        {
            foreach (var collider in SelectedObjects)
            {
                var rect = collider.GetBoundingRectangle(camera);
                context.FillRectangle(rect, new ColorRgbaF(1, 0, 0, 0.2f));
                context.DrawRectangle(rect.ToRectangleF(), ColorRgbaF.Black, 2);
            }

            if (SelectionBoxVisible)
            {
                context.FillRectangle(SelectionRectangle, new ColorRgbaF(1, 1, 1, 0.1f));
                context.DrawRectangle(SelectionRectangle.ToRectangleF(), ColorRgbaF.Black, 2);
            }
        }