Hi Allen
We have created a sample to achieve your requirement. In below attached sample, we have added a PolygonArea() method to find the area of the polygon node in runtime.
Code example:
[VB]
Private Function PolygonArea(ByVal points() As PointF) As Single
' Add the first point to the end.
Dim num_points As Integer = points.Length
Dim pts(num_points) As PointF
points.CopyTo(pts, 0)
pts(num_points) = points(0)
' Get the areas.
Dim area As Single = 0
For i As Integer = 0 To num_points - 1
area += (pts(i + 1).X - pts(i).X) * (pts(i + 1).Y + pts(i).Y) / 2
Next i
' Return the result.
Return Math.Abs(area)
End Function
Sample:
Video:
Regards,
Naganathan K G