Example #1
0
        public static void DrawStringShadowed(this Graphics g, string Text, Font font, Brush Color, Brush ShadowColor, float x, float y, ETextShadow Position)
        {
            if ((Position & ETextShadow.Top) == ETextShadow.Top)
            {
                g.DrawString(Text, font, ShadowColor, x, y - 1);
            }
            if ((Position & ETextShadow.Top) == ETextShadow.TopLeft)
            {
                g.DrawString(Text, font, ShadowColor, x - 1, y - 1);
            }
            if ((Position & ETextShadow.Top) == ETextShadow.TopRight)
            {
                g.DrawString(Text, font, ShadowColor, x + 1, y - 1);
            }

            if ((Position & ETextShadow.Bottom) == ETextShadow.Bottom)
            {
                g.DrawString(Text, font, ShadowColor, x, y + 1);
            }
            if ((Position & ETextShadow.Bottom) == ETextShadow.BottomLeft)
            {
                g.DrawString(Text, font, ShadowColor, x - 1, y + 1);
            }
            if ((Position & ETextShadow.Bottom) == ETextShadow.BottomRight)
            {
                g.DrawString(Text, font, ShadowColor, x + 1, y + 1);
            }

            if ((Position & ETextShadow.Left) == ETextShadow.Left)
            {
                g.DrawString(Text, font, ShadowColor, x - 1, y);
            }
            if ((Position & ETextShadow.Right) == ETextShadow.Right)
            {
                g.DrawString(Text, font, ShadowColor, x + 1, y);
            }

            g.DrawString(Text, font, Color, x, y);
        }
Example #2
0
 public static void DrawStringShadowed(this Graphics g, string Text, Font font, Brush Color, Brush ShadowColor, int x, int y, ETextShadow Position)
 {
     g.DrawStringShadowed(Text, font, Color, ShadowColor, (float)x, (float)y, Position);
 }