Revit.SDK.Samples.CurtainWallGrid.CS.GridDrawing.GetOutlineIndex C# (CSharp) Méthode

GetOutlineIndex() private méthode

get which grid line (in GraphicsPath format) contains the specified point, if the grid line contains the point, return the index of the grid line
private GetOutlineIndex ( List pathList, System point ) : int
pathList List /// the grid line list to be checked with the specified point ///
point System /// the point which need to be checked ///
Résultat int
        private int GetOutlineIndex(List<GraphicsPath> pathList, System.Drawing.Point point)
        {
            for (int i = 0; i < pathList.Count; i++)
             {
            Pen redPen = Pens.Red;
            GraphicsPath path = pathList[i];
            if (path.IsOutlineVisible(point, redPen))
            {
               return i;
            }
             }

             return -1;
        }