5 instantiations of StrokeFIndices
PresentationCore (5)
Core\CSharp\MS\Internal\Ink\ErasingStroke.cs (1)
185fragment = new StrokeFIndices(
Core\CSharp\MS\Internal\Ink\StrokeFIndices.cs (2)
27private static StrokeFIndices s_empty = new StrokeFIndices(AfterLast, BeforeFirst); 28private static StrokeFIndices s_full = new StrokeFIndices(BeforeFirst, AfterLast);
Core\CSharp\MS\Internal\Ink\StrokeIntersection.cs (2)
51_hitSegment = new StrokeFIndices(hitBegin, hitEnd); 52_inSegment = new StrokeFIndices(inBegin, inEnd);
168 references to StrokeFIndices
PresentationCore (168)
Core\CSharp\MS\Internal\Ink\EllipticalNodeOperations.cs (32)
387internal override StrokeFIndices CutTest( 403StrokeFIndices result = StrokeFIndices.Empty; 410result.EndFIndex = StrokeFIndices.AfterLast; 411result.BeginFIndex = beginNode.IsEmpty ? StrokeFIndices.BeforeFirst : 1; 420result.BeginFIndex = StrokeFIndices.BeforeFirst; 421if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 438if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 443if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 450return StrokeFIndices.Empty; 465internal override StrokeFIndices CutTest( 488StrokeFIndices result = StrokeFIndices.Empty; 517if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 519result.EndFIndex = StrokeFIndices.AfterLast; 522result.BeginFIndex = StrokeFIndices.BeforeFirst; 525if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 532if ((beginNode.IsEmpty == false) && (!isHit || !DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst))) 539if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 541result.BeginFIndex = StrokeFIndices.BeforeFirst; 542if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 582result = StrokeFIndices.Full; 584else if ((DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) && (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.AfterLast))) 586result.EndFIndex = StrokeFIndices.AfterLast; 588else if ((DoubleUtil.AreClose(result.BeginFIndex,StrokeFIndices.AfterLast)) && (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst))) 590result.BeginFIndex = StrokeFIndices.BeforeFirst; 596return StrokeFIndices.Empty; 799Vector spineVector, Vector hitBegin, Vector hitEnd, double endRadius, double beginRadius, ref StrokeFIndices result) 803if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 817if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst))
Core\CSharp\MS\Internal\Ink\ErasingStroke.cs (10)
143List<StrokeFIndices> eraseAt = new List<StrokeFIndices>(); 169StrokeFIndices fragment = inkStrokeNode.CutTest(erasingStrokeNode); 179StrokeFIndices lastFragment = eraseAt[i]; 226StrokeFIndices lastFragment = eraseAt[index - 1]; 227if (DoubleUtil.AreClose(lastFragment.EndFIndex, StrokeFIndices.AfterLast) ) 229if (DoubleUtil.AreClose(eraseAt[index].BeginFIndex, StrokeFIndices.BeforeFirst)) 248foreach (StrokeFIndices segment in eraseAt) 250intersections.Add(new StrokeIntersection(segment.BeginFIndex, StrokeFIndices.AfterLast, 251StrokeFIndices.BeforeFirst, segment.EndFIndex));
Core\CSharp\MS\Internal\Ink\Lasso.cs (19)
263StrokeFIndices strokeFIndices = strokeNode.CutTest(lastPoint, point); 364if (DoubleUtil.AreClose(fIndex, StrokeFIndices.BeforeFirst)) 369else if (DoubleUtil.AreClose(fIndex, StrokeFIndices.AfterLast)) 396si.HitBegin = StrokeFIndices.BeforeFirst; 397si.InBegin = StrokeFIndices.BeforeFirst; 410if (DoubleUtil.AreClose(si.InBegin, StrokeFIndices.AfterLast)) 412si.InEnd = StrokeFIndices.BeforeFirst; 416si.InEnd = StrokeFIndices.AfterLast; 418si.HitEnd = StrokeFIndices.AfterLast; 426if (DoubleUtil.AreClose(si.InEnd, StrokeFIndices.BeforeFirst)) 428System.Diagnostics.Debug.Assert(DoubleUtil.AreClose(si.InBegin, StrokeFIndices.BeforeFirst)); 429si.InBegin = StrokeFIndices.AfterLast; 441si.InBegin = StrokeFIndices.AfterLast; 442si.InEnd = StrokeFIndices.BeforeFirst; 468if (DoubleUtil.AreClose(si.HitEnd, StrokeFIndices.AfterLast)) 552internal StrokeFIndices FIndices; 561public LassoCrossing(StrokeFIndices newFIndices, StrokeNode strokeNode) 585crossing.FIndices = StrokeFIndices.Empty; 907private static readonly double NoIntersection = StrokeFIndices.BeforeFirst;
Core\CSharp\MS\Internal\Ink\StrokeFIndices.cs (14)
23internal struct StrokeFIndices : IEquatable<StrokeFIndices> 27private static StrokeFIndices s_empty = new StrokeFIndices(AfterLast, BeforeFirst); 28private static StrokeFIndices s_full = new StrokeFIndices(BeforeFirst, AfterLast); 89public bool Equals(StrokeFIndices strokeFIndices) 104return ((StrokeFIndices)obj == this); 122public static bool operator ==(StrokeFIndices sfiLeft, StrokeFIndices sfiRight) 134public static bool operator !=(StrokeFIndices sfiLeft, StrokeFIndices sfiRight) 141if (DoubleUtil.AreClose(fIndex, StrokeFIndices.BeforeFirst)) 145if (DoubleUtil.AreClose(fIndex, StrokeFIndices.AfterLast)) 155internal static StrokeFIndices Empty { get { return s_empty; } } 160internal static StrokeFIndices Full { get { return s_full; } } 186internal int CompareTo(StrokeFIndices fIndices)
Core\CSharp\MS\Internal\Ink\StrokeIntersection.cs (18)
33internal static double BeforeFirst { get { return StrokeFIndices.BeforeFirst; } } 39internal static double AfterLast { get { return StrokeFIndices.AfterLast; } } 100return "{" + StrokeFIndices.GetStringRepresentation(_hitSegment.BeginFIndex) + "," 101+ StrokeFIndices.GetStringRepresentation(_inSegment.BeginFIndex) + "," 102+ StrokeFIndices.GetStringRepresentation(_inSegment.EndFIndex) + "," 103+ StrokeFIndices.GetStringRepresentation(_hitSegment.EndFIndex) + "}"; 170internal StrokeFIndices HitSegment 178internal StrokeFIndices InSegment 190internal static StrokeFIndices[] GetInSegments(StrokeIntersection[] intersections) 195List<StrokeFIndices> inFIndices = new List<StrokeFIndices>(intersections.Length); 206StrokeFIndices sfiPrevious = inFIndices[inFIndices.Count - 1]; 222internal static StrokeFIndices[] GetHitSegments(StrokeIntersection[] intersections) 227List<StrokeFIndices> hitFIndices = new List<StrokeFIndices>(intersections.Length); 238StrokeFIndices sfiPrevious = hitFIndices[hitFIndices.Count - 1]; 255private StrokeFIndices _hitSegment; 256private StrokeFIndices _inSegment;
Core\CSharp\MS\Internal\Ink\StrokeNode.cs (16)
871internal StrokeFIndices CutTest(StrokeNode hitNode) 875return StrokeFIndices.Empty; 882StrokeFIndices cutAt = _operations.CutTest(_lastNode, _thisNode, ConnectingQuad, hittingContour); 894internal StrokeFIndices CutTest(Point begin, Point end) 898return StrokeFIndices.Empty; 903StrokeFIndices cutAt = _operations.CutTest(_lastNode, _thisNode, ConnectingQuad, begin, end); 921private StrokeFIndices BindFIndices(StrokeFIndices fragment) 928if (!DoubleUtil.AreClose(fragment.BeginFIndex, StrokeFIndices.BeforeFirst)) 933if (!DoubleUtil.AreClose(fragment.EndFIndex, StrokeFIndices.AfterLast)) 952private StrokeFIndices BindFIndicesForLassoHitTest(StrokeFIndices fragment) 959if (DoubleUtil.AreClose(fragment.BeginFIndex, StrokeFIndices.BeforeFirst)) 962fragment.BeginFIndex = (_index == 0 ? StrokeFIndices.BeforeFirst:_index - 1); 976if (DoubleUtil.AreClose(fragment.EndFIndex, StrokeFIndices.AfterLast)) 979fragment.EndFIndex = (_isLastNode ? StrokeFIndices.AfterLast:_index);
Core\CSharp\MS\Internal\Ink\StrokeNodeOperations.cs (41)
477internal virtual StrokeFIndices CutTest( 480StrokeFIndices result = StrokeFIndices.Empty; 502result.BeginFIndex = StrokeFIndices.BeforeFirst; 507result.EndFIndex = StrokeFIndices.AfterLast; 510result.BeginFIndex = StrokeFIndices.BeforeFirst; 512else if (result.BeginFIndex != StrokeFIndices.BeforeFirst) 532if (result.BeginFIndex != StrokeFIndices.BeforeFirst) 542if (result.EndFIndex != StrokeFIndices.AfterLast) 554return StrokeFIndices.Empty; 569internal virtual StrokeFIndices CutTest( 576return StrokeFIndices.Full; 578return StrokeFIndices.Empty; 581StrokeFIndices result = StrokeFIndices.Empty; 634if (!DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 637if (findex != StrokeFIndices.BeforeFirst) 648if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 651if (findex != StrokeFIndices.BeforeFirst) 663if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.AfterLast)) 665if (!DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) 667result.BeginFIndex = StrokeFIndices.BeforeFirst; 670else if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.BeforeFirst)) 672result.EndFIndex = StrokeFIndices.AfterLast; 677return StrokeFIndices.Empty; 680return (result.IsEmpty && isInside) ? StrokeFIndices.Full : result; 709double findex = StrokeFIndices.AfterLast; 1197ContourSegment hitSegment, StrokeNodeData beginNode, StrokeNodeData endNode, ref StrokeFIndices result) 1207if (isHit && DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 1216if (isHit && DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 1252result.BeginFIndex = StrokeFIndices.BeforeFirst; 1253if (DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast)) 1260result.EndFIndex = StrokeFIndices.AfterLast; 1263result.BeginFIndex = StrokeFIndices.BeforeFirst; 1266if (DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst)) 1287double findex = StrokeFIndices.BeforeFirst; 1306if ( findex == StrokeFIndices.AfterLast ) 1308findex = StrokeFIndices.BeforeFirst; 1321protected bool IsInvalidCutTestResult(StrokeFIndices result) 1330DoubleUtil.AreClose(result.BeginFIndex, StrokeFIndices.BeforeFirst) && result.EndFIndex < 0.0f || 1331result.BeginFIndex > 1.0f && DoubleUtil.AreClose(result.EndFIndex, StrokeFIndices.AfterLast))
Core\CSharp\System\Windows\Ink\Stroke.cs (16)
745private StrokeCollection Clip(StrokeFIndices[] cutAt) 779System.Diagnostics.Debug.Assert(false == ((!DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast)) && 784StrokeFIndices fragment = cutAt[i]; 807private StrokeCollection Erase(StrokeFIndices[] cutAt) 835System.Diagnostics.Debug.Assert(false == ((!DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast)) && 840double beginFIndex = StrokeFIndices.BeforeFirst; 841if (cutAt[0].BeginFIndex == StrokeFIndices.BeforeFirst) 848StrokeFIndices fragment = cutAt[i]; 865if (beginFIndex != StrokeFIndices.AfterLast) 867Stroke stroke = Copy(sourceStylusPoints, beginFIndex, StrokeFIndices.AfterLast); 887(DoubleUtil.AreClose(StrokeFIndices.BeforeFirst, beginFIndex)) 891(DoubleUtil.AreClose(StrokeFIndices.AfterLast, endFIndex)) 924if (!DoubleUtil.AreClose(beginFIndex, StrokeFIndices.BeforeFirst)) 928if (!DoubleUtil.AreClose(endFIndex, StrokeFIndices.AfterLast)) 940if ((!DoubleUtil.AreClose(endFIndex, StrokeFIndices.AfterLast)) && !DoubleUtil.AreClose(endIndex, endFIndex)) 957if ((!DoubleUtil.AreClose(beginFIndex, StrokeFIndices.BeforeFirst)) && !DoubleUtil.AreClose(beginIndex, beginFIndex))
Core\CSharp\System\Windows\Ink\Stroke2.cs (2)
678StrokeFIndices[] hitSegments = StrokeIntersection.GetHitSegments(cutAt); 699StrokeFIndices[] inSegments = StrokeIntersection.GetInSegments(cutAt);