Advertisement
AlphaWolf536791

RoundRectangle Script - Better

Jul 9th, 2020
1,194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. // Another version of the RoundRectangle script.
  2. // But personally for a control itself.
  3. // Also you have to handle the "getting the GraphicsPath" part yourself.
  4.  
  5. Shape.AddArc(0, 0, 10, 10, 180, 90);
  6. Shape.AddArc(Width - 11, 0, 10, 10, -90, 90);
  7. Shape.AddArc(Width - 11, Height - 11, 10, 10, 0, 90);
  8. Shape.AddArc(0, Height - 11, 10, 10, 90, 90);
  9. Shape.CloseAllFigures();
  10. Invalidate();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement