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