Profile Picture

Programmatically draw line shape for library

Posted By Ashley Davy 3 Years Ago
Author
Message
Ashley Davy
Question Posted 3 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 36, Visits: 119
I am building a custom library of shapes so that the user can drag and drop them onto the grid.  I would like to build a shape that is a line that has the endpoints so that the user can resize the line after it is dropped on the grid.  It should work similar to the Alternative Branch 1 in the Decision Tree Shapes library.  Below is my code that is used to draw the shape but it does not contain the handles to resize the line or reposition the ends of the line.  Also I need to turn off the rotation circle.

Thanks,
Ashley

Private Function DrawFillet4() As Nevron.Nov.Diagram.NShape

   Dim FilletShape As Nevron.Nov.Diagram.NShape = New Nevron.Nov.Diagram.NShape()

   Dim TopMoveTo As NMoveTo = New NMoveTo(0, 0)
   TopMoveTo.ShowFill = False

   FilletShape.Geometry.Add(TopMoveTo)
   FilletShape.Geometry.LineTo(300, 0)

   'FilletShape.AllowRotate = False
   'FilletShape.AllowResizeX = False
   'FilletShape.AllowResizeY = False

   Dim StrokeFillet As NStroke = New NStroke()
   StrokeFillet.Width = 3
   StrokeFillet.Color = New NColor(pnlSymbolColor.BackColor.R, pnlSymbolColor.BackColor.G, pnlSymbolColor.BackColor.B)

   FilletShape.Geometry.Stroke = StrokeFillet

   Return FilletShape

  End Function






Similar Topics


Reading This Topic