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, AlphaTransform alpha)voiddrawImage(Image image, float x, float y, Transform transform)voiddrawPolygon(Polygon polygon, ColorRGB color, AlphaTransform alpha)voiddrawRect(Rect rect, ColorRGB color, AlphaTransform alpha)default voiddrawSprite(Sprite sprite, float x, float y, Transform transform)default voiddrawText(java.lang.String text, TTFont font, float x, float y)default voiddrawText(java.lang.String text, TTFont font, float x, float y, Align align)voiddrawText(java.lang.String text, TTFont font, float x, float y, Align align, AlphaTransform alpha)CanvasgetCanvas()default intgetCanvasHeight()default intgetCanvasWidth()
-
-
-
Method Detail
-
getCanvas
Canvas getCanvas()
-
getCanvasWidth
default int getCanvasWidth()
-
getCanvasHeight
default int getCanvasHeight()
-
drawBackground
void drawBackground(ColorRGB backgroundColor)
-
drawRect
void drawRect(Rect rect, ColorRGB color, AlphaTransform alpha)
-
drawCircle
void drawCircle(Circle circle, ColorRGB color, AlphaTransform alpha)
-
drawPolygon
void drawPolygon(Polygon polygon, ColorRGB color, AlphaTransform alpha)
-
drawText
void drawText(java.lang.String text, TTFont font, float x, float y, Align align, AlphaTransform alpha)
-
drawText
default void drawText(java.lang.String text, TTFont font, float x, float y)
-
-