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