Interface IDrawingSpace

All Superinterfaces:
IPipelineInput, IPipelineNode

public interface IDrawingSpace extends IPipelineInput
Drawing utility for drawing single pixels or other shapes and forms.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    buffer(FullSpacedColorBuffer buffer, int x, int y)
    Draws a buffer in the drawing space.
    void
    circle(int x, int y, int radius, int color)
    Draws a filled circle in the drawing space.
    If you use colors with alpha=255, significant faster methods are used internally.
    void
    circle(int x, int y, int radius, int thickness, int color)
    Draws a hollow circle in the drawing space with the border using the specified thickness.
    If you use colors with alpha=255, significant faster methods are used internally.
    void
    Clears the drawing space.
    void
    clear(int x, int y, int width, int height)
    Clears the drawing space in the given area.
    void
    component(net.kyori.adventure.text.Component component, Font font, int x, int y)
    Draw a component to the drawing space.
    The component will be left-aligned (x-axis) and centered (y-axis),
    Antialiasing will be enabled and the line height will be 1.2
    void
    component(net.kyori.adventure.text.Component component, Font font, int x, int y, Alignment alignmentX, Alignment alignmentY)
    Draw a component to the drawing space.
    Antialiasing will be enabled and the line height will be 1.2
    void
    component(net.kyori.adventure.text.Component component, Font font, int x, int y, Alignment alignmentX, Alignment alignmentY, boolean antiAliasing)
    Draw a component to the drawing space.
    The line height will be 1.2
    void
    component(net.kyori.adventure.text.Component component, Font font, int x, int y, Alignment alignmentX, Alignment alignmentY, boolean antiAliasing, float lineHeight)
    Draw a component to the drawing space.
    void
    ellipse(int x, int y, int radiusX, int radiusY, int color)
    Draws a filled ellipse in the drawing space.
    If you use colors with alpha=255, significant faster methods are used internally.
    void
    ellipse(int x, int y, int radiusX, int radiusY, int thickness, int color)
    Draws a hollow ellipse in the drawing space with the border using the specified thickness.
    If you use colors with alpha=255, significant faster methods are used internally.
    void
    image(BufferedImage image, int x, int y)
    Draws an image in the drawing space.
    void
    line(int x1, int y1, int x2, int y2, int color)
    Draws a line in the drawing space.
    void
    line(int x1, int y1, int x2, int y2, int thickness, int color)
    Draws a line in the drawing space.
    void
    pixel(int x, int y, int color)
    Draws a pixel in the drawing space
    void
    pixels(int[] pixels, int x, int y, int width, int height)
    Draws multiple pixels in the drawing space.
    void
    polygon(int[] x, int[] y, int color)
    Draws a filled polygon in the drawing space.
    void
    polygon(int[] x, int[] y, int thickness, int color)
    Draws a hollow polygon in the drawing space with the border using the specified thickness.
    void
    rect(int x, int y, int width, int height, int color)
    Draws a filled rectangle in the drawing space.
    void
    rect(int x, int y, int width, int height, int thickness, int color)
    Draws a hollow rectangle in the drawing space with the border using the specified thickness.
    void
    text(String text, Font font, int x, int y, int color)
    Draws a text in the drawing space.
    void
    triangle(int x1, int y1, int x2, int y2, int x3, int y3, int color)
    Draws a filled triangle in the drawing space.
    void
    triangle(int x1, int y1, int x2, int y2, int x3, int y3, int thickness, int color)
    Draws a hollow triangle in the drawing space with the border using the specified thickness.

    Methods inherited from interface de.pianoman911.mapengine.api.pipeline.IPipelineInput

    buffer, ctx, flush

    Methods inherited from interface de.pianoman911.mapengine.api.pipeline.IPipelineNode

    destroy
  • Method Details

    • clear

      void clear()
      Clears the drawing space.
    • clear

      void clear(int x, int y, int width, int height)
      Clears the drawing space in the given area.
      Parameters:
      x - the x coordinate of the area
      y - the y coordinate of the area
      width - the width of the area
      height - the height of the area
    • pixel

      void pixel(int x, int y, int color)
      Draws a pixel in the drawing space
      Parameters:
      x - the x coordinate of the pixel
      y - the y coordinate of the pixel
      color - the argb color of the pixel
    • pixels

      void pixels(int[] pixels, int x, int y, int width, int height)
      Draws multiple pixels in the drawing space.
      Parameters:
      pixels - the pixels to draw in argb format
      x - the x coordinate of the pixels
      y - the y coordinate of the pixels
      width - the width of the pixels
      height - the height of the pixels
    • buffer

      void buffer(FullSpacedColorBuffer buffer, int x, int y)
      Draws a buffer in the drawing space.
      Parameters:
      buffer - the buffer to draw
      x - the x coordinate of the buffer
      y - the y coordinate of the buffer
    • line

      void line(int x1, int y1, int x2, int y2, int color)
      Draws a line in the drawing space.
      Parameters:
      x1 - the x coordinate of the first point
      y1 - the y coordinate of the first point
      x2 - the x coordinate of the second point
      y2 - the y coordinate of the second point
      color - the rgb color of the line
    • line

      void line(int x1, int y1, int x2, int y2, int thickness, int color)
      Draws a line in the drawing space.
      Parameters:
      x1 - the x coordinate of the first point
      y1 - the y coordinate of the first point
      x2 - the x coordinate of the second point
      y2 - the y coordinate of the second point
      thickness - the thickness of the line
      color - the rgb color of the line
    • rect

      void rect(int x, int y, int width, int height, int thickness, int color)
      Draws a hollow rectangle in the drawing space with the border using the specified thickness.
      Parameters:
      x - the x coordinate of the rectangle
      y - the y coordinate of the rectangle
      width - the width of the rectangle
      height - the height of the rectangle
      thickness - the thickness of the rectangle
      color - the rgb color of the rectangle
    • rect

      void rect(int x, int y, int width, int height, int color)
      Draws a filled rectangle in the drawing space.
      Parameters:
      x - the x coordinate of the rectangle
      y - the y coordinate of the rectangle
      width - the width of the rectangle
      height - the height of the rectangle
      color - the rgb color of the rectangle
    • circle

      void circle(int x, int y, int radius, int thickness, int color)
      Draws a hollow circle in the drawing space with the border using the specified thickness.
      If you use colors with alpha=255, significant faster methods are used internally.
      Parameters:
      x - the x coordinate of the circle
      y - the y coordinate of the circle
      radius - the radius of the circle
      thickness - the thickness of the circle
      color - the rgb color of the circle
    • circle

      void circle(int x, int y, int radius, int color)
      Draws a filled circle in the drawing space.
      If you use colors with alpha=255, significant faster methods are used internally.
      Parameters:
      x - the x coordinate of the circle
      y - the y coordinate of the circle
      radius - the radius of the circle
      color - the rgb color of the circle
    • ellipse

      void ellipse(int x, int y, int radiusX, int radiusY, int thickness, int color)
      Draws a hollow ellipse in the drawing space with the border using the specified thickness.
      If you use colors with alpha=255, significant faster methods are used internally.
      Parameters:
      x - the x coordinate of the ellipse
      y - the y coordinate of the ellipse
      radiusX - the x radius of the ellipse
      radiusY - the y radius of the ellipse
      thickness - the thickness of the ellipse
      color - the rgb color of the ellipse
    • ellipse

      void ellipse(int x, int y, int radiusX, int radiusY, int color)
      Draws a filled ellipse in the drawing space.
      If you use colors with alpha=255, significant faster methods are used internally.
      Parameters:
      x - the x coordinate of the ellipse
      y - the y coordinate of the ellipse
      radiusX - the x radius of the ellipse
      radiusY - the y radius of the ellipse
      color - the rgb color of the ellipse
    • triangle

      void triangle(int x1, int y1, int x2, int y2, int x3, int y3, int thickness, int color)
      Draws a hollow triangle in the drawing space with the border using the specified thickness.
      Parameters:
      x1 - the x coordinate of the first point
      y1 - the y coordinate of the first point
      x2 - the x coordinate of the second point
      y2 - the y coordinate of the second point
      x3 - the x coordinate of the third point
      y3 - the y coordinate of the third point
      thickness - the thickness of the triangle
      color - the rgb color of the triangle
    • triangle

      void triangle(int x1, int y1, int x2, int y2, int x3, int y3, int color)
      Draws a filled triangle in the drawing space.
      Parameters:
      x1 - the x coordinate of the first point
      y1 - the y coordinate of the first point
      x2 - the x coordinate of the second point
      y2 - the y coordinate of the second point
      x3 - the x coordinate of the third point
      y3 - the y coordinate of the third point
      color - the rgb color of the triangle
    • polygon

      void polygon(int[] x, int[] y, int thickness, int color)
      Draws a hollow polygon in the drawing space with the border using the specified thickness.
      Parameters:
      x - the x coordinates of the polygon
      y - the y coordinates of the polygon
      thickness - the thickness of the polygon
      color - the rgb color of the polygon
    • polygon

      void polygon(int[] x, int[] y, int color)
      Draws a filled polygon in the drawing space.
      Parameters:
      x - the x coordinates of the polygon
      y - the y coordinates of the polygon
      color - the rgb color of the polygon
    • text

      void text(String text, Font font, int x, int y, int color)
      Draws a text in the drawing space.
      Parameters:
      text - the text to draw
      font - the font of the text
      x - the x coordinate of the text
      y - the y coordinate of the text
      color - the rgb color of the text
    • component

      void component(net.kyori.adventure.text.Component component, Font font, int x, int y)
      Draw a component to the drawing space.
      The component will be left-aligned (x-axis) and centered (y-axis),
      Antialiasing will be enabled and the line height will be 1.2

      WARNING: This will only write text components with their color. Decorations will be completely ignored.

      Parameters:
      component - the component to draw
      font - the font of what is drawn
      x - the x coordinate of the component
      y - the y coordinate of the component
    • component

      void component(net.kyori.adventure.text.Component component, Font font, int x, int y, Alignment alignmentX, Alignment alignmentY)
      Draw a component to the drawing space.
      Antialiasing will be enabled and the line height will be 1.2

      WARNING: This will only write text components with their color, decorations will be completely ignored.

      Parameters:
      component - the component to draw
      font - the font of what is drawn
      x - the x coordinate of the component
      y - the y coordinate of the component
      alignmentX - the horizontal alignment of the component
      alignmentY - the vertical alignment of the component
    • component

      void component(net.kyori.adventure.text.Component component, Font font, int x, int y, Alignment alignmentX, Alignment alignmentY, boolean antiAliasing)
      Draw a component to the drawing space.
      The line height will be 1.2

      WARNING: This will only write text components with their color, decorations will be completely ignored.

      Parameters:
      component - the component to draw
      font - the font of what is drawn
      x - the x coordinate of the component
      y - the y coordinate of the component
      alignmentX - the horizontal alignment of the component
      alignmentY - the vertical alignment of the component
      antiAliasing - if antialiasing should be enabled (less rough edges)
    • component

      void component(net.kyori.adventure.text.Component component, Font font, int x, int y, Alignment alignmentX, Alignment alignmentY, boolean antiAliasing, float lineHeight)
      Draw a component to the drawing space.

      WARNING: This will only write text components with their color, decorations will be completely ignored.

      Parameters:
      component - the component to draw
      font - the font of what is drawn
      x - the x coordinate of the component
      y - the y coordinate of the component
      alignmentX - the horizontal alignment of the component
      alignmentY - the vertical alignment of the component
      antiAliasing - if antialiasing should be enabled (less rough edges)
      lineHeight - the line height in percent (1.0 = 100%), 1.2 is recommended
    • image

      void image(BufferedImage image, int x, int y)
      Draws an image in the drawing space.
      Parameters:
      image - the image to draw
      x - the x coordinate of the image
      y - the y coordinate of the image