5 instantiations of StrokeFIndices
PresentationCore (5)
MS\Internal\Ink\ErasingStroke.cs (1)
181fragment = new StrokeFIndices(
MS\Internal\Ink\StrokeFIndices.cs (2)
17private static readonly StrokeFIndices s_empty = new StrokeFIndices(AfterLast, BeforeFirst); 18private static readonly StrokeFIndices s_full = new StrokeFIndices(BeforeFirst, AfterLast);
MS\Internal\Ink\StrokeIntersection.cs (2)
43_hitSegment = new StrokeFIndices(hitBegin, hitEnd); 44_inSegment = new StrokeFIndices(inBegin, inEnd);
171 references to StrokeFIndices
PresentationCore (171)
MS\Internal\Ink\EllipticalNodeOperations.cs (32)
381internal override StrokeFIndices CutTest( 397StrokeFIndices result = StrokeFIndices.Empty; 404result.EndFIndex = StrokeFIndices.AfterLast; 405result.BeginFIndex = beginNode.IsEmpty ? StrokeFIndices.BeforeFirst : 1; 414result.BeginFIndex = StrokeFIndices.BeforeFirst; 415if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 432if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 437if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 444return StrokeFIndices.Empty; 459internal override StrokeFIndices CutTest( 482StrokeFIndices result = StrokeFIndices.Empty; 511if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 513result.EndFIndex = StrokeFIndices.AfterLast; 516result.BeginFIndex = StrokeFIndices.BeforeFirst; 519if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 526if ((!beginNode.IsEmpty) && (!isHit || !DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst))) 533if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 535result.BeginFIndex = StrokeFIndices.BeforeFirst; 536if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 574result = StrokeFIndices.Full; 576else if ((DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) && (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.AfterLast))) 578result.EndFIndex = StrokeFIndices.AfterLast; 580else if ((DoubleUtil.AreClose(result.BeginFIndex,StrokeFIndices.AfterLast)) && (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst))) 582result.BeginFIndex = StrokeFIndices.BeforeFirst; 588return StrokeFIndices.Empty; 791Vector spineVector, Vector hitBegin, Vector hitEnd, double endRadius, double beginRadius, ref StrokeFIndices result) 795if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 809if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst))
MS\Internal\Ink\ErasingStroke.cs (10)
139List<StrokeFIndices> eraseAt = new List<StrokeFIndices>(); 165StrokeFIndices fragment = inkStrokeNode.CutTest(erasingStrokeNode); 175StrokeFIndices lastFragment = eraseAt[i]; 222StrokeFIndices lastFragment = eraseAt[index - 1]; 223if (DoubleUtil.AreClose(lastFragment.EndFIndex, StrokeFIndices.AfterLast) ) 225if (DoubleUtil.AreClose(eraseAt[index].BeginFIndex, StrokeFIndices.BeforeFirst)) 244foreach (StrokeFIndices segment in eraseAt) 246intersections.Add(new StrokeIntersection(segment.BeginFIndex, StrokeFIndices.AfterLast, 247StrokeFIndices.BeforeFirst, segment.EndFIndex));
MS\Internal\Ink\Lasso.cs (19)
257StrokeFIndices strokeFIndices = strokeNode.CutTest(lastPoint, point); 357if (DoubleUtil.AreClose(fIndex, StrokeFIndices.BeforeFirst)) 362else if (DoubleUtil.AreClose(fIndex, StrokeFIndices.AfterLast)) 389si.HitBegin = StrokeFIndices.BeforeFirst; 390si.InBegin = StrokeFIndices.BeforeFirst; 403if (DoubleUtil.AreClose(si.InBegin, StrokeFIndices.AfterLast)) 405si.InEnd = StrokeFIndices.BeforeFirst; 409si.InEnd = StrokeFIndices.AfterLast; 411si.HitEnd = StrokeFIndices.AfterLast; 419if (DoubleUtil.AreClose(si.InEnd, StrokeFIndices.BeforeFirst)) 421System.Diagnostics.Debug.Assert(DoubleUtil.AreClose(si.InBegin, StrokeFIndices.BeforeFirst)); 422si.InBegin = StrokeFIndices.AfterLast; 434si.InBegin = StrokeFIndices.AfterLast; 435si.InEnd = StrokeFIndices.BeforeFirst; 461if (DoubleUtil.AreClose(si.HitEnd, StrokeFIndices.AfterLast)) 545internal StrokeFIndices FIndices; 554public LassoCrossing(StrokeFIndices newFIndices, StrokeNode strokeNode) 579FIndices = StrokeFIndices.Empty 906private static readonly double NoIntersection = StrokeFIndices.BeforeFirst;
MS\Internal\Ink\StrokeFIndices.cs (14)
14internal struct StrokeFIndices : IEquatable<StrokeFIndices> 17private static readonly StrokeFIndices s_empty = new StrokeFIndices(AfterLast, BeforeFirst); 18private static readonly StrokeFIndices s_full = new StrokeFIndices(BeforeFirst, AfterLast); 79public bool Equals(StrokeFIndices strokeFIndices) 94return ((StrokeFIndices)obj == this); 112public static bool operator ==(StrokeFIndices sfiLeft, StrokeFIndices sfiRight) 124public static bool operator !=(StrokeFIndices sfiLeft, StrokeFIndices sfiRight) 131if (DoubleUtil.AreClose(fIndex, StrokeFIndices.BeforeFirst)) 135if (DoubleUtil.AreClose(fIndex, StrokeFIndices.AfterLast)) 145internal static StrokeFIndices Empty { get { return s_empty; } } 150internal static StrokeFIndices Full { get { return s_full; } } 176internal int CompareTo(StrokeFIndices fIndices)
MS\Internal\Ink\StrokeIntersection.cs (18)
25internal static double BeforeFirst { get { return StrokeFIndices.BeforeFirst; } } 31internal static double AfterLast { get { return StrokeFIndices.AfterLast; } } 92return "{" + StrokeFIndices.GetStringRepresentation(_hitSegment.BeginFIndex) + "," 93+ StrokeFIndices.GetStringRepresentation(_inSegment.BeginFIndex) + "," 94+ StrokeFIndices.GetStringRepresentation(_inSegment.EndFIndex) + "," 95+ StrokeFIndices.GetStringRepresentation(_hitSegment.EndFIndex) + "}"; 162internal StrokeFIndices HitSegment 170internal StrokeFIndices InSegment 182internal static StrokeFIndices[] GetInSegments(StrokeIntersection[] intersections) 187List<StrokeFIndices> inFIndices = new List<StrokeFIndices>(intersections.Length); 198StrokeFIndices sfiPrevious = inFIndices[inFIndices.Count - 1]; 214internal static StrokeFIndices[] GetHitSegments(StrokeIntersection[] intersections) 219List<StrokeFIndices> hitFIndices = new List<StrokeFIndices>(intersections.Length); 230StrokeFIndices sfiPrevious = hitFIndices[hitFIndices.Count - 1]; 247private StrokeFIndices _hitSegment; 248private StrokeFIndices _inSegment;
MS\Internal\Ink\StrokeNode.cs (16)
863internal StrokeFIndices CutTest(StrokeNode hitNode) 867return StrokeFIndices.Empty; 874StrokeFIndices cutAt = _operations.CutTest(_lastNode, _thisNode, ConnectingQuad, hittingContour); 886internal StrokeFIndices CutTest(Point begin, Point end) 890return StrokeFIndices.Empty; 895StrokeFIndices cutAt = _operations.CutTest(_lastNode, _thisNode, ConnectingQuad, begin, end); 913private StrokeFIndices BindFIndices(StrokeFIndices fragment) 920if (!DoubleUtil.AreClose(fragment.BeginFIndex, StrokeFIndices.BeforeFirst)) 925if (!DoubleUtil.AreClose(fragment.EndFIndex, StrokeFIndices.AfterLast)) 944private StrokeFIndices BindFIndicesForLassoHitTest(StrokeFIndices fragment) 950if (DoubleUtil.AreClose(fragment.BeginFIndex, StrokeFIndices.BeforeFirst)) 953fragment.BeginFIndex = (_index == 0 ? StrokeFIndices.BeforeFirst:_index - 1); 967if (DoubleUtil.AreClose(fragment.EndFIndex, StrokeFIndices.AfterLast)) 970fragment.EndFIndex = (_isLastNode ? StrokeFIndices.AfterLast:_index);
MS\Internal\Ink\StrokeNodeOperations.cs (41)
460internal virtual StrokeFIndices CutTest( 463StrokeFIndices result = StrokeFIndices.Empty; 485result.BeginFIndex = StrokeFIndices.BeforeFirst; 490result.EndFIndex = StrokeFIndices.AfterLast; 493result.BeginFIndex = StrokeFIndices.BeforeFirst; 495else if (result.BeginFIndex != StrokeFIndices.BeforeFirst) 515if (result.BeginFIndex != StrokeFIndices.BeforeFirst) 525if (result.EndFIndex != StrokeFIndices.AfterLast) 537return StrokeFIndices.Empty; 552internal virtual StrokeFIndices CutTest( 559return StrokeFIndices.Full; 561return StrokeFIndices.Empty; 564StrokeFIndices result = StrokeFIndices.Empty; 612if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 615if (findex != StrokeFIndices.BeforeFirst) 626if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 629if (findex != StrokeFIndices.BeforeFirst) 641if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.AfterLast)) 643if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) 645result.BeginFIndex = StrokeFIndices.BeforeFirst; 648else if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) 650result.EndFIndex = StrokeFIndices.AfterLast; 655return StrokeFIndices.Empty; 658return (result.IsEmpty && isInside) ? StrokeFIndices.Full : result; 687double findex = StrokeFIndices.AfterLast; 1175in ContourSegment hitSegment, in StrokeNodeData beginNode, in StrokeNodeData endNode, ref StrokeFIndices result) 1185if (isHit && DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 1194if (isHit && DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 1230result.BeginFIndex = StrokeFIndices.BeforeFirst; 1231if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 1238result.EndFIndex = StrokeFIndices.AfterLast; 1241result.BeginFIndex = StrokeFIndices.BeforeFirst; 1244if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 1265double findex = StrokeFIndices.BeforeFirst; 1283if ( findex == StrokeFIndices.AfterLast ) 1285findex = StrokeFIndices.BeforeFirst; 1298protected bool IsInvalidCutTestResult(StrokeFIndices result) 1307DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst) && result.EndFIndex < 0.0f || 1308result.BeginFIndex > 1.0f && DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast))
System\Windows\Ink\Stroke.cs (19)
712private StrokeCollection Clip(StrokeFIndices[] cutAt) 746System.Diagnostics.Debug.Assert(DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast) || 751StrokeFIndices fragment = cutAt[i]; 774private StrokeCollection Erase(StrokeFIndices[] cutAt) 802System.Diagnostics.Debug.Assert(DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast) || 807double beginFIndex = StrokeFIndices.BeforeFirst; 808if (cutAt[0].BeginFIndex == StrokeFIndices.BeforeFirst) 815StrokeFIndices fragment = cutAt[i]; 832if (beginFIndex != StrokeFIndices.AfterLast) 834Stroke stroke = Copy(sourceStylusPoints, beginFIndex, StrokeFIndices.AfterLast); 854(DoubleUtil.AreClose(StrokeFIndices.BeforeFirst, beginFIndex)) 858(DoubleUtil.AreClose(StrokeFIndices.AfterLast, endFIndex)) 891if (!DoubleUtil.AreClose(beginFIndex, StrokeFIndices.BeforeFirst)) 895if (!DoubleUtil.AreClose(endFIndex, StrokeFIndices.AfterLast)) 906if ((!DoubleUtil.AreClose(endFIndex, StrokeFIndices.AfterLast)) && !DoubleUtil.AreClose(endIndex, endFIndex)) 922if ((!DoubleUtil.AreClose(beginFIndex, StrokeFIndices.BeforeFirst)) && !DoubleUtil.AreClose(beginIndex, beginFIndex)) 994private void AssertSortedNoOverlap(StrokeFIndices[] fragments) 1005double current = StrokeFIndices.BeforeFirst; 1021private bool IsValidStrokeFIndices(StrokeFIndices findex)
System\Windows\Ink\Stroke2.cs (2)
619StrokeFIndices[] hitSegments = StrokeIntersection.GetHitSegments(cutAt); 640StrokeFIndices[] inSegments = StrokeIntersection.GetInSegments(cutAt);