Beispiel #1
0
        public IntXYPair GetPositionActual()
        {
            switch (alignment)
            {
            case Alignment.Right:
                return(new IntXYPair(position.GetX() - GetTextLength() + 1,
                                     position.GetY()));

            case Alignment.Center:
                return(new IntXYPair(position.GetX() - (GetTextLength() - 1) / 2,
                                     position.GetY()));

            default:
                return(position);
            }
        }
Beispiel #2
0
 public FreeString(string text, IntXYPair position, Color foregroundColor, Color backgroundColor)
     : this(text, position.GetX(), position.GetY(), foregroundColor, backgroundColor)
 {
 }
Beispiel #3
0
 public FreeString(string text, IntXYPair position)
     : this(text, position.GetX(), position.GetY())
 {
 }