All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.lessvoid.nifty.slick2d.render.font.SlickRenderFont Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
package de.lessvoid.nifty.slick2d.render.font;

import de.lessvoid.nifty.spi.render.RenderFont;
import de.lessvoid.nifty.tools.Color;
import org.newdawn.slick.Graphics;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * This interface extends the normal Nifty {@link RenderFont} to make it usable with the render device of this Slick
 * renderer.
 *
 * @author Martin Karing <[email protected]>
 */
public interface SlickRenderFont extends RenderFont {
  /**
   * Render a text using this font.
   *
   * @param g     the slick graphics object that is used to render
   * @param text  the text that is supposed to be rendered
   * @param locX  the x coordinate of the position on the screen where the text is supposed to be rendered
   * @param locY  the y coordinate of the position on the screen where the text is supposed to be rendered
   * @param color the color of the text
   * @param sizeX the horizontal scaling factor of the text
   * @param sizeY the vertical scaling factor of the text
   * @throws IllegalArgumentException in case the parameter g is {@code null} or in case the parameter text is {@code
   *                                  null}
   */
  void renderText(
      @Nonnull Graphics g,
      @Nonnull String text,
      int locX,
      int locY,
      @Nullable Color color,
      float sizeX,
      float sizeY);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy