Example #1
0
 public XingKongLabel()
 {
     FontSize = XingKongScreen.XFontSize.Normal;
     Text     = string.Empty;
     Left     = 0;
     Top      = 0;
 }
Example #2
0
        public XingKongLabel(string text, XingKongScreen.XFontSize size, int left, int top)
        {
            FontSize = size;
            Text     = text;
            Left     = (short)left;
            Top      = (short)top;

            NeedDraw = true;
        }
Example #3
0
        private int getTextHeight(XingKongScreen.XFontSize fontSize)
        {
            int fontsize = 32;

            switch (fontSize)
            {
            case XingKongScreen.XFontSize.Large:
                fontsize = 48;
                break;

            case XingKongScreen.XFontSize.ExtraLarge:
                fontsize = 64;
                break;

            default:
                break;
            }
            return(fontsize);
        }
        private int getFontHeightPixel(XingKongScreen.XFontSize fontSize)
        {
            int height = 32;

            switch (fontSize)
            {
            case XingKongScreen.XFontSize.Normal:
                height = 32;
                break;

            case XingKongScreen.XFontSize.Large:
                height = 48;
                break;

            case XingKongScreen.XFontSize.ExtraLarge:
                height = 64;
                break;

            default:
                break;
            }
            return(height);
        }