WordBorder.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Windows; 6 7 namespace PowerOCR.Models; 8 9 public class WordBorder 10 { 11 public bool IsSelected { get; set; } 12 13 public string Word { get; set; } = string.Empty; 14 15 public double Top { get; set; } 16 17 public double Left { get; set; } 18 19 public double Width { get; set; } 20 21 public double Height { get; set; } 22 23 public int LineNumber { get; set; } 24 25 public double Right => Left + Width; 26 27 public double Bottom => Top + Height; 28 29 public int ResultRowID { get; set; } 30 31 public int ResultColumnID { get; set; } 32 33 public Rect AsRect() 34 { 35 return new Rect(Left, Top, Width, Height); 36 } 37 38 public bool IntersectsWith(Rect rect) 39 { 40 return rect.IntersectsWith(AsRect()); 41 } 42 }