Пример #1
0
            private bool IsVisuallyIdentical(MetafileParser.NormalizedPoint a, PointF b)
            {
                bool result;

                for (int i = this._normalizedPoints.Count - 1; i >= 0; i--)
                {
                    if (this._normalizedPoints[i].VisualIndex == a.VisualIndex && this.IsVisuallyIdentical(this._normalizedPoints[i].Point, b))
                    {
                        result = true;
                        return(result);
                    }
                }
                result = false;
                return(result);
            }
Пример #2
0
 private MetafileParser.NormalizedPoint Add(PointF point)
 {
     MetafileParser.VisualPoint     visualPoint;
     MetafileParser.NormalizedPoint normalizedPoint;
     MetafileParser.NormalizedPoint result;
     for (int i = this._normalizedPoints.Count - 1; i >= 0; i--)
     {
         if (this.IsVisuallyIdentical(this._normalizedPoints[i].Point, point))
         {
             visualPoint = this._visualPoints[this._normalizedPoints[i].VisualIndex];
             visualPoint.Weight++;
             normalizedPoint = new MetafileParser.NormalizedPoint
             {
                 Point       = point,
                 VisualIndex = visualPoint.VisualIndex
             };
             this._normalizedPoints.Add(normalizedPoint);
             result = normalizedPoint;
             return(result);
         }
     }
     visualPoint = new MetafileParser.VisualPoint
     {
         IsLocked    = false,
         VisualIndex = this._visualPoints.Count,
         Weight      = 1
     };
     this._visualPoints.Add(visualPoint);
     normalizedPoint = new MetafileParser.NormalizedPoint
     {
         Point       = point,
         VisualIndex = visualPoint.VisualIndex
     };
     this._normalizedPoints.Add(normalizedPoint);
     result = normalizedPoint;
     return(result);
 }
Пример #3
0
 private bool IsVisuallyIdentical(MetafileParser.NormalizedPoint a, MetafileParser.NormalizedPoint b)
 {
     return(a.VisualIndex == b.VisualIndex);
 }