5 instantiations of StrokeFIndices
PresentationCore (5)
MS\Internal\Ink\ErasingStroke.cs (1)
182fragment = new StrokeFIndices(
MS\Internal\Ink\StrokeFIndices.cs (2)
18private static readonly StrokeFIndices s_empty = new StrokeFIndices(AfterLast, BeforeFirst); 19private static readonly StrokeFIndices s_full = new StrokeFIndices(BeforeFirst, AfterLast);
MS\Internal\Ink\StrokeIntersection.cs (2)
44_hitSegment = new StrokeFIndices(hitBegin, hitEnd); 45_inSegment = new StrokeFIndices(inBegin, inEnd);
171 references to StrokeFIndices
PresentationCore (171)
MS\Internal\Ink\EllipticalNodeOperations.cs (32)
382internal override StrokeFIndices CutTest( 398StrokeFIndices result = StrokeFIndices.Empty; 405result.EndFIndex = StrokeFIndices.AfterLast; 406result.BeginFIndex = beginNode.IsEmpty ? StrokeFIndices.BeforeFirst : 1; 415result.BeginFIndex = StrokeFIndices.BeforeFirst; 416if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 433if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 438if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 445return StrokeFIndices.Empty; 460internal override StrokeFIndices CutTest( 483StrokeFIndices result = StrokeFIndices.Empty; 512if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 514result.EndFIndex = StrokeFIndices.AfterLast; 517result.BeginFIndex = StrokeFIndices.BeforeFirst; 520if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 527if ((beginNode.IsEmpty == false) && (!isHit || !DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst))) 534if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 536result.BeginFIndex = StrokeFIndices.BeforeFirst; 537if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 575result = StrokeFIndices.Full; 577else if ((DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) && (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.AfterLast))) 579result.EndFIndex = StrokeFIndices.AfterLast; 581else if ((DoubleUtil.AreClose(result.BeginFIndex,StrokeFIndices.AfterLast)) && (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst))) 583result.BeginFIndex = StrokeFIndices.BeforeFirst; 589return StrokeFIndices.Empty; 792Vector spineVector, Vector hitBegin, Vector hitEnd, double endRadius, double beginRadius, ref StrokeFIndices result) 796if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 810if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst))
MS\Internal\Ink\ErasingStroke.cs (10)
140List<StrokeFIndices> eraseAt = new List<StrokeFIndices>(); 166StrokeFIndices fragment = inkStrokeNode.CutTest(erasingStrokeNode); 176StrokeFIndices lastFragment = eraseAt[i]; 223StrokeFIndices lastFragment = eraseAt[index - 1]; 224if (DoubleUtil.AreClose(lastFragment.EndFIndex, StrokeFIndices.AfterLast) ) 226if (DoubleUtil.AreClose(eraseAt[index].BeginFIndex, StrokeFIndices.BeforeFirst)) 245foreach (StrokeFIndices segment in eraseAt) 247intersections.Add(new StrokeIntersection(segment.BeginFIndex, StrokeFIndices.AfterLast, 248StrokeFIndices.BeforeFirst, segment.EndFIndex));
MS\Internal\Ink\Lasso.cs (19)
258StrokeFIndices strokeFIndices = strokeNode.CutTest(lastPoint, point); 358if (DoubleUtil.AreClose(fIndex, StrokeFIndices.BeforeFirst)) 363else if (DoubleUtil.AreClose(fIndex, StrokeFIndices.AfterLast)) 390si.HitBegin = StrokeFIndices.BeforeFirst; 391si.InBegin = StrokeFIndices.BeforeFirst; 404if (DoubleUtil.AreClose(si.InBegin, StrokeFIndices.AfterLast)) 406si.InEnd = StrokeFIndices.BeforeFirst; 410si.InEnd = StrokeFIndices.AfterLast; 412si.HitEnd = StrokeFIndices.AfterLast; 420if (DoubleUtil.AreClose(si.InEnd, StrokeFIndices.BeforeFirst)) 422System.Diagnostics.Debug.Assert(DoubleUtil.AreClose(si.InBegin, StrokeFIndices.BeforeFirst)); 423si.InBegin = StrokeFIndices.AfterLast; 435si.InBegin = StrokeFIndices.AfterLast; 436si.InEnd = StrokeFIndices.BeforeFirst; 462if (DoubleUtil.AreClose(si.HitEnd, StrokeFIndices.AfterLast)) 546internal StrokeFIndices FIndices; 555public LassoCrossing(StrokeFIndices newFIndices, StrokeNode strokeNode) 579crossing.FIndices = StrokeFIndices.Empty; 901private static readonly double NoIntersection = StrokeFIndices.BeforeFirst;
MS\Internal\Ink\StrokeFIndices.cs (14)
15internal struct StrokeFIndices : IEquatable<StrokeFIndices> 18private static readonly StrokeFIndices s_empty = new StrokeFIndices(AfterLast, BeforeFirst); 19private static readonly StrokeFIndices s_full = new StrokeFIndices(BeforeFirst, AfterLast); 80public bool Equals(StrokeFIndices strokeFIndices) 95return ((StrokeFIndices)obj == this); 113public static bool operator ==(StrokeFIndices sfiLeft, StrokeFIndices sfiRight) 125public static bool operator !=(StrokeFIndices sfiLeft, StrokeFIndices sfiRight) 132if (DoubleUtil.AreClose(fIndex, StrokeFIndices.BeforeFirst)) 136if (DoubleUtil.AreClose(fIndex, StrokeFIndices.AfterLast)) 146internal static StrokeFIndices Empty { get { return s_empty; } } 151internal static StrokeFIndices Full { get { return s_full; } } 177internal int CompareTo(StrokeFIndices fIndices)
MS\Internal\Ink\StrokeIntersection.cs (18)
26internal static double BeforeFirst { get { return StrokeFIndices.BeforeFirst; } } 32internal static double AfterLast { get { return StrokeFIndices.AfterLast; } } 93return "{" + StrokeFIndices.GetStringRepresentation(_hitSegment.BeginFIndex) + "," 94+ StrokeFIndices.GetStringRepresentation(_inSegment.BeginFIndex) + "," 95+ StrokeFIndices.GetStringRepresentation(_inSegment.EndFIndex) + "," 96+ StrokeFIndices.GetStringRepresentation(_hitSegment.EndFIndex) + "}"; 163internal StrokeFIndices HitSegment 171internal StrokeFIndices InSegment 183internal static StrokeFIndices[] GetInSegments(StrokeIntersection[] intersections) 188List<StrokeFIndices> inFIndices = new List<StrokeFIndices>(intersections.Length); 199StrokeFIndices sfiPrevious = inFIndices[inFIndices.Count - 1]; 215internal static StrokeFIndices[] GetHitSegments(StrokeIntersection[] intersections) 220List<StrokeFIndices> hitFIndices = new List<StrokeFIndices>(intersections.Length); 231StrokeFIndices sfiPrevious = hitFIndices[hitFIndices.Count - 1]; 248private StrokeFIndices _hitSegment; 249private StrokeFIndices _inSegment;
MS\Internal\Ink\StrokeNode.cs (16)
864internal StrokeFIndices CutTest(StrokeNode hitNode) 868return StrokeFIndices.Empty; 875StrokeFIndices cutAt = _operations.CutTest(_lastNode, _thisNode, ConnectingQuad, hittingContour); 887internal StrokeFIndices CutTest(Point begin, Point end) 891return StrokeFIndices.Empty; 896StrokeFIndices cutAt = _operations.CutTest(_lastNode, _thisNode, ConnectingQuad, begin, end); 914private StrokeFIndices BindFIndices(StrokeFIndices fragment) 921if (!DoubleUtil.AreClose(fragment.BeginFIndex, StrokeFIndices.BeforeFirst)) 926if (!DoubleUtil.AreClose(fragment.EndFIndex, StrokeFIndices.AfterLast)) 945private StrokeFIndices BindFIndicesForLassoHitTest(StrokeFIndices fragment) 951if (DoubleUtil.AreClose(fragment.BeginFIndex, StrokeFIndices.BeforeFirst)) 954fragment.BeginFIndex = (_index == 0 ? StrokeFIndices.BeforeFirst:_index - 1); 968if (DoubleUtil.AreClose(fragment.EndFIndex, StrokeFIndices.AfterLast)) 971fragment.EndFIndex = (_isLastNode ? StrokeFIndices.AfterLast:_index);
MS\Internal\Ink\StrokeNodeOperations.cs (41)
461internal virtual StrokeFIndices CutTest( 464StrokeFIndices result = StrokeFIndices.Empty; 486result.BeginFIndex = StrokeFIndices.BeforeFirst; 491result.EndFIndex = StrokeFIndices.AfterLast; 494result.BeginFIndex = StrokeFIndices.BeforeFirst; 496else if (result.BeginFIndex != StrokeFIndices.BeforeFirst) 516if (result.BeginFIndex != StrokeFIndices.BeforeFirst) 526if (result.EndFIndex != StrokeFIndices.AfterLast) 538return StrokeFIndices.Empty; 553internal virtual StrokeFIndices CutTest( 560return StrokeFIndices.Full; 562return StrokeFIndices.Empty; 565StrokeFIndices result = StrokeFIndices.Empty; 613if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 616if (findex != StrokeFIndices.BeforeFirst) 627if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 630if (findex != StrokeFIndices.BeforeFirst) 642if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.AfterLast)) 644if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) 646result.BeginFIndex = StrokeFIndices.BeforeFirst; 649else if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) 651result.EndFIndex = StrokeFIndices.AfterLast; 656return StrokeFIndices.Empty; 659return (result.IsEmpty && isInside) ? StrokeFIndices.Full : result; 688double findex = StrokeFIndices.AfterLast; 1176in ContourSegment hitSegment, in StrokeNodeData beginNode, in StrokeNodeData endNode, ref StrokeFIndices result) 1186if (isHit && DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 1195if (isHit && DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 1231result.BeginFIndex = StrokeFIndices.BeforeFirst; 1232if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 1239result.EndFIndex = StrokeFIndices.AfterLast; 1242result.BeginFIndex = StrokeFIndices.BeforeFirst; 1245if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 1266double findex = StrokeFIndices.BeforeFirst; 1284if ( findex == StrokeFIndices.AfterLast ) 1286findex = StrokeFIndices.BeforeFirst; 1299protected bool IsInvalidCutTestResult(StrokeFIndices result) 1308DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst) && result.EndFIndex < 0.0f || 1309result.BeginFIndex > 1.0f && DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast))
System\Windows\Ink\Stroke.cs (19)
713private StrokeCollection Clip(StrokeFIndices[] cutAt) 747System.Diagnostics.Debug.Assert(false == ((!DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast)) && 752StrokeFIndices fragment = cutAt[i]; 775private StrokeCollection Erase(StrokeFIndices[] cutAt) 803System.Diagnostics.Debug.Assert(false == ((!DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast)) && 808double beginFIndex = StrokeFIndices.BeforeFirst; 809if (cutAt[0].BeginFIndex == StrokeFIndices.BeforeFirst) 816StrokeFIndices fragment = cutAt[i]; 833if (beginFIndex != StrokeFIndices.AfterLast) 835Stroke stroke = Copy(sourceStylusPoints, beginFIndex, StrokeFIndices.AfterLast); 855(DoubleUtil.AreClose(StrokeFIndices.BeforeFirst, beginFIndex)) 859(DoubleUtil.AreClose(StrokeFIndices.AfterLast, endFIndex)) 892if (!DoubleUtil.AreClose(beginFIndex, StrokeFIndices.BeforeFirst)) 896if (!DoubleUtil.AreClose(endFIndex, StrokeFIndices.AfterLast)) 907if ((!DoubleUtil.AreClose(endFIndex, StrokeFIndices.AfterLast)) && !DoubleUtil.AreClose(endIndex, endFIndex)) 923if ((!DoubleUtil.AreClose(beginFIndex, StrokeFIndices.BeforeFirst)) && !DoubleUtil.AreClose(beginIndex, beginFIndex)) 995private void AssertSortedNoOverlap(StrokeFIndices[] fragments) 1006double current = StrokeFIndices.BeforeFirst; 1022private bool IsValidStrokeFIndices(StrokeFIndices findex)
System\Windows\Ink\Stroke2.cs (2)
626StrokeFIndices[] hitSegments = StrokeIntersection.GetHitSegments(cutAt); 647StrokeFIndices[] inSegments = StrokeIntersection.GetInSegments(cutAt);