/// <summary> /// Draws a string. /// </summary> /// <param name="str">String to draw.</param> /// <param name="pos">Position of the string.</param> /// <param name="col">Color of the string.</param> public static void DrawStr(string str, Position pos, Color col) { pos += offset; for (int i = -1; i <= 1; i++) for (int j = -1; j <= 1; j++) if (i != 0 && j != 0) sb.DrawString(font, str, pos + new Position(i, j), new Color(0, 0, 0, col.A)); sb.DrawString(font, str, pos, col); }
/// <summary> /// Draws a line. /// </summary> /// <param name="p1">First point of the line.</param> /// <param name="p2">Second point of the line.</param> /// <param name="c">Color of the line.</param> public static void DrawLn(Position p1, Position p2, Color c) { p1 += offset; p2 += offset; sb.Draw(wTex, p1, null, c, (float)Math.Atan2(p2.Y - p1.Y, p2.X - p1.X), Vector2.Zero, new Vector2(((Vector2)(p1 - p2)).Length(), 1), SpriteEffects.None, 0); }