/// <summary> /// Draw a texture, determined by its name. /// </summary> /// <param name="location">Location where to draw the texture</param> /// <param name="textureName">Name identifying the texture</param> /// <param name="angle">Rotation angle for the texture</param> /// <param name="size">Size of the texture in world-meters</param> /// <param name="minPixelSize">Minimum size in pixels, to make sure you always see something</param> /// <param name="maxPixelSize">Maximum size in pixels, to make sure icons are not becoming too big</param> /// <param name="color">Color you want the simple texture to have</param> public void DrawTexture(WorldLocation location, string textureName, float size, int minPixelSize, int maxPixelSize, Color color, float angle) { if (OutOfArea(location)) { return; } float pixelSize = (float)Math.Min(Math.Max(GetWindowSize(size), minPixelSize), maxPixelSize); BasicShapes.DrawTexture(GetWindowVector(location), textureName, angle, pixelSize, color, false); }
/// <summary> /// Draw a texture, determined by its name, with possible flipping /// </summary> /// <param name="location">Location where to draw the texture</param> /// <param name="textureName">Name identifying the texture</param> /// <param name="angle">Rotation angle for the texture</param> /// <param name="size">Size of the texture in world-meters</param> ///<param name="flip">Whether the texture needs to be flipped (vertically)</param> public void DrawTexture(WorldLocation location, string textureName, float size, float angle, bool flip) { if (OutOfArea(location)) { return; } float pixelSize = GetWindowSize(size); BasicShapes.DrawTexture(GetWindowVector(location), textureName, angle, pixelSize, Color.White, flip); }