Interface IDrawingSpace
- All Superinterfaces:
IPipelineInput,IPipelineNode
Drawing utility for drawing single pixels or other
shapes and forms.
-
Method Summary
Modifier and TypeMethodDescriptionvoidbuffer(FullSpacedColorBuffer buffer, int x, int y) Draws a buffer in the drawing space.voidcircle(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.voidcircle(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.voidclear()Clears the drawing space.voidclear(int x, int y, int width, int height) Clears the drawing space in the given area.voidDraw 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.2voidcomponent(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.2voidcomponent(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.2voidcomponent(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.voidellipse(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.voidellipse(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.voidimage(BufferedImage image, int x, int y) Draws an image in the drawing space.voidline(int x1, int y1, int x2, int y2, int color) Draws a line in the drawing space.voidline(int x1, int y1, int x2, int y2, int thickness, int color) Draws a line in the drawing space.voidpixel(int x, int y, int color) Draws a pixel in the drawing spacevoidpixels(int[] pixels, int x, int y, int width, int height) Draws multiple pixels in the drawing space.voidpolygon(int[] x, int[] y, int color) Draws a filled polygon in the drawing space.voidpolygon(int[] x, int[] y, int thickness, int color) Draws a hollow polygon in the drawing space with the border using the specified thickness.voidrect(int x, int y, int width, int height, int color) Draws a filled rectangle in the drawing space.voidrect(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.voidDraws a text in the drawing space.voidtriangle(int x1, int y1, int x2, int y2, int x3, int y3, int color) Draws a filled triangle in the drawing space.voidtriangle(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, flushMethods 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 areay- the y coordinate of the areawidth- the width of the areaheight- 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 pixely- the y coordinate of the pixelcolor- 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 formatx- the x coordinate of the pixelsy- the y coordinate of the pixelswidth- the width of the pixelsheight- the height of the pixels
-
buffer
Draws a buffer in the drawing space.- Parameters:
buffer- the buffer to drawx- the x coordinate of the buffery- 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 pointy1- the y coordinate of the first pointx2- the x coordinate of the second pointy2- the y coordinate of the second pointcolor- 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 pointy1- the y coordinate of the first pointx2- the x coordinate of the second pointy2- the y coordinate of the second pointthickness- the thickness of the linecolor- 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 rectangley- the y coordinate of the rectanglewidth- the width of the rectangleheight- the height of the rectanglethickness- the thickness of the rectanglecolor- 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 rectangley- the y coordinate of the rectanglewidth- the width of the rectangleheight- the height of the rectanglecolor- 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 circley- the y coordinate of the circleradius- the radius of the circlethickness- the thickness of the circlecolor- 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 circley- the y coordinate of the circleradius- the radius of the circlecolor- 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 ellipsey- the y coordinate of the ellipseradiusX- the x radius of the ellipseradiusY- the y radius of the ellipsethickness- the thickness of the ellipsecolor- 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 ellipsey- the y coordinate of the ellipseradiusX- the x radius of the ellipseradiusY- the y radius of the ellipsecolor- 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 pointy1- the y coordinate of the first pointx2- the x coordinate of the second pointy2- the y coordinate of the second pointx3- the x coordinate of the third pointy3- the y coordinate of the third pointthickness- the thickness of the trianglecolor- 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 pointy1- the y coordinate of the first pointx2- the x coordinate of the second pointy2- the y coordinate of the second pointx3- the x coordinate of the third pointy3- the y coordinate of the third pointcolor- 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 polygony- the y coordinates of the polygonthickness- the thickness of the polygoncolor- 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 polygony- the y coordinates of the polygoncolor- the rgb color of the polygon
-
text
Draws a text in the drawing space.- Parameters:
text- the text to drawfont- the font of the textx- the x coordinate of the texty- the y coordinate of the textcolor- the rgb color of the text
-
component
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.2WARNING: This will only write text components with their color. Decorations will be completely ignored.
- Parameters:
component- the component to drawfont- the font of what is drawnx- the x coordinate of the componenty- 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.2WARNING: This will only write text components with their color, decorations will be completely ignored.
- Parameters:
component- the component to drawfont- the font of what is drawnx- the x coordinate of the componenty- the y coordinate of the componentalignmentX- the horizontal alignment of the componentalignmentY- 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.2WARNING: This will only write text components with their color, decorations will be completely ignored.
- Parameters:
component- the component to drawfont- the font of what is drawnx- the x coordinate of the componenty- the y coordinate of the componentalignmentX- the horizontal alignment of the componentalignmentY- the vertical alignment of the componentantiAliasing- 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 drawfont- the font of what is drawnx- the x coordinate of the componenty- the y coordinate of the componentalignmentX- the horizontal alignment of the componentalignmentY- the vertical alignment of the componentantiAliasing- if antialiasing should be enabled (less rough edges)lineHeight- the line height in percent (1.0 = 100%), 1.2 is recommended
-
image
Draws an image in the drawing space.- Parameters:
image- the image to drawx- the x coordinate of the imagey- the y coordinate of the image
-