Advertisement
Guest User

draw black 50% transparent box

a guest
Apr 4th, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.24 KB | None | 0 0
  1. _boxBrush.Color = new Color(0,0,0); //Black
  2. _boxBrush.Brush.Opacity = 0.5f; // 50% opacity
  3. Rectangle r = Rectangle.Create(x - playerScreen.Z / 4 - 3, y - 5, w + 3, h + 5);
  4. gfx.DrawRectangle(_boxBrush, r, 1);
  5. gfx.FillRectangle(_boxBrush, r);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement