diff options
Diffstat (limited to 'platform/windows/gsview/TextCharacter.cs')
-rw-r--r-- | platform/windows/gsview/TextCharacter.cs | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/platform/windows/gsview/TextCharacter.cs b/platform/windows/gsview/TextCharacter.cs new file mode 100644 index 00000000..b69cfbff --- /dev/null +++ b/platform/windows/gsview/TextCharacter.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +//using System.Threading.Tasks; +using System.ComponentModel; + +namespace gsview +{ + public class TextCharacter + { + public String character; + + public double Height + { + get; + set; + } + + public double Width + { + get; + set; + } + + public double X + { + get; + set; + } + + public double Y + { + get; + set; + } + + public double Scale + { + get; + set; + } + + public String Color + { + get; + set; + } + + /* Here we only worry about intersection in the x direction TODO */ + public Intersection_t CheckIntersection(double rect_x, double rect_y, double rect_w, double rect_h) + { + if (rect_w == 0 || rect_x > X + Width || rect_x + rect_w < X) + return Intersection_t.NONE; + + if (rect_x <= X && X + Width <= rect_x + rect_w) + return Intersection_t.FULL; + + return Intersection_t.PARTIAL; + } + + + //public event PropertyChangedEventHandler PropertyChanged; + + /* + public void CharRefresh() + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs("X")); + PropertyChanged(this, new PropertyChangedEventArgs("Height")); + PropertyChanged(this, new PropertyChangedEventArgs("Width")); + PropertyChanged(this, new PropertyChangedEventArgs("Y")); + PropertyChanged(this, new PropertyChangedEventArgs("Color")); + } + } + * */ + } +} |