Skip to content

Instantly share code, notes, and snippets.

@musoftware
Created November 14, 2016 09:23
Show Gist options
  • Select an option

  • Save musoftware/82db425e9917c92f51d1f44dc2d1157b to your computer and use it in GitHub Desktop.

Select an option

Save musoftware/82db425e9917c92f51d1f44dc2d1157b to your computer and use it in GitHub Desktop.
cut control by graphic Path
Dim graphics_path As New GraphicsPath
Dim m() As Point = {New Point(23, 62), New Point(31, 56), New Point(37, 53), New Point(38, 53), New Point(45, 51), New Point(53, 53), New Point(60, 55), New Point(65, 54), New Point(65, 49), New Point(62, 42), New Point(61, 35), New Point(65, 27), New Point(73, 23), New Point(81, 22), New Point(86, 25), New Point(86, 26), New Point(92, 23), New Point(93, 29), New Point(92, 41), New Point(90, 45), New Point(91, 49), New Point(91, 52), New Point(88, 54), New Point(88, 59), New Point(86, 61), New Point(84, 65), New Point(77, 68), New Point(83, 74), New Point(91, 77), New Point(96, 81), New Point(105, 86), New Point(103, 93), New Point(95, 95), New Point(88, 92), New Point(81, 90), New Point(76, 89), New Point(56, 102), New Point(52, 103), New Point(53, 100), New Point(48, 102), New Point(45, 110), New Point(38, 117), New Point(29, 120), New Point(23, 120), New Point(19, 119), New Point(14, 122), New Point(11, 121), New Point(11, 117), New Point(19, 112), New Point(28, 111), New Point(29, 107), New Point(27, 97), New Point(29, 85), New Point(30, 83), New Point(26, 75), New Point(22, 67), New Point(24, 61)}
graphics_path.AddLines(m)
PictureBox2.Region = New Region(graphics_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment