Ejemplo n.º 1
0
 public virtual bool Overlaps(SyntaxHighlightSegment segment)
 {
     return((this.OrderedStart <= segment.OrderedStart &&
             this.OrderedEnd > segment.OrderedStart) ||
            (this.OrderedStart < segment.OrderedEnd &&
             this.OrderedEnd >= segment.OrderedEnd));
     //return (this.OrderedStart <= segment.OrderedStart &&
     //        this.OrderedEnd >= segment.OrderedStart) ||
     //    (this.OrderedStart <= segment.OrderedEnd &&
     //    this.OrderedEnd >= segment.OrderedEnd);
 }
 public virtual bool Overlaps(SyntaxHighlightSegment segment)
 {
     return (this.OrderedStart <= segment.OrderedStart &&
             this.OrderedEnd > segment.OrderedStart) ||
         (this.OrderedStart < segment.OrderedEnd &&
         this.OrderedEnd >= segment.OrderedEnd);
     //return (this.OrderedStart <= segment.OrderedStart &&
     //        this.OrderedEnd >= segment.OrderedStart) ||
     //    (this.OrderedStart <= segment.OrderedEnd &&
     //    this.OrderedEnd >= segment.OrderedEnd);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// A Segment is SuperiorTo another segment when it completely contains another segment
 /// or overlaps it and starts earlier.
 /// </summary>
 /// <param name="segment"></param>
 /// <returns></returns>
 public virtual bool SuperiorTo(SyntaxHighlightSegment segment)
 {
     return(this.Contains(segment) || (this.Overlaps(segment) && this.OrderedStart < segment.OrderedStart));
 }
Ejemplo n.º 4
0
 public virtual bool Contains(SyntaxHighlightSegment segment)
 {
     return(this.OrderedStart <= segment.OrderedStart &&
            this.OrderedEnd >= segment.OrderedEnd);
 }
 /// <summary>
 /// A Segment is SuperiorTo another segment when it completely contains another segment
 /// or overlaps it and starts earlier.
 /// </summary>
 /// <param name="segment"></param>
 /// <returns></returns>
 public virtual bool SuperiorTo(SyntaxHighlightSegment segment)
 {
     return this.Contains(segment) || (this.Overlaps(segment) && this.OrderedStart < segment.OrderedStart);
 }
 public virtual bool Contains(SyntaxHighlightSegment segment)
 {
     return this.OrderedStart <= segment.OrderedStart &&
         this.OrderedEnd >= segment.OrderedEnd;
 }