Interface GraphicsContext
-
- All Known Implementing Classes:
GDXRenderer,Java2DGraphicsContext,TeaGraphicsContext
public interface GraphicsContextProvides access to the renderer's drawing operations. The renderer only allows drawing operations at the end of a frame updates, when the frame is rendered.All drawing operations use X and Y coordinates that are relative to the canvas, with the (0, 0) coordinate representing the top left corner. When drawing objects, the X and Y coordinates indicate where the object's center will be drawn. There is no explicit Z coordinate, depth ordering is based on the order in which the graphics are drawn.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddrawBackground(ColorRGB backgroundColor)voiddrawCircle(Circle circle, ColorRGB color, Transform transform)voiddrawImage(Image image, float x, float y, Transform transform)voiddrawPolygon(Polygon polygon, ColorRGB color, Transform transform)voiddrawRect(Rect rect, ColorRGB color, Transform transform)default voiddrawSprite(Sprite sprite, float x, float y, Transform transform)default voiddrawText(java.lang.String text, TrueTypeFont font, float x, float y)default voiddrawText(java.lang.String text, TrueTypeFont font, float x, float y, Align align)voiddrawText(java.lang.String text, TrueTypeFont font, float x, float y, Align align, Transform transform)CanvasgetCanvas()default intgetCanvasHeight()default intgetCanvasWidth()
-
-
-
Method Detail
-
getCanvas
Canvas getCanvas()
-
getCanvasWidth
default int getCanvasWidth()
-
getCanvasHeight
default int getCanvasHeight()
-
drawBackground
void drawBackground(ColorRGB backgroundColor)
-
drawText
void drawText(java.lang.String text, TrueTypeFont font, float x, float y, Align align, Transform transform)
-
drawText
default void drawText(java.lang.String text, TrueTypeFont font, float x, float y, Align align)
-
drawText
default void drawText(java.lang.String text, TrueTypeFont font, float x, float y)
-
-