Class TeaGraphicsContext
- java.lang.Object
-
- nl.colorize.multimedialib.renderer.teavm.TeaGraphicsContext
-
- All Implemented Interfaces:
GraphicsContext
public class TeaGraphicsContext extends java.lang.Object implements GraphicsContext
Delegates all drawing operations to the browser using TeaVM. The actual implementations of the drawing operations can be found in JavaScript.
-
-
Constructor Summary
Constructors Constructor Description TeaGraphicsContext(Canvas canvas)
-
Method Summary
All Methods Instance Methods Concrete 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)voiddrawText(java.lang.String text, TTFont font, float x, float y, Align align, AlphaTransform alpha)CanvasgetCanvas()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface nl.colorize.multimedialib.renderer.GraphicsContext
drawSprite, drawText, drawText, getCanvasHeight, getCanvasWidth
-
-
-
-
Constructor Detail
-
TeaGraphicsContext
public TeaGraphicsContext(Canvas canvas)
-
-
Method Detail
-
drawBackground
public void drawBackground(ColorRGB backgroundColor)
- Specified by:
drawBackgroundin interfaceGraphicsContext
-
drawRect
public void drawRect(Rect rect, ColorRGB color, AlphaTransform alpha)
- Specified by:
drawRectin interfaceGraphicsContext
-
drawCircle
public void drawCircle(Circle circle, ColorRGB color, AlphaTransform alpha)
- Specified by:
drawCirclein interfaceGraphicsContext
-
drawPolygon
public void drawPolygon(Polygon polygon, ColorRGB color, AlphaTransform alpha)
- Specified by:
drawPolygonin interfaceGraphicsContext
-
drawImage
public void drawImage(Image image, float x, float y, Transform transform)
- Specified by:
drawImagein interfaceGraphicsContext
-
drawText
public void drawText(java.lang.String text, TTFont font, float x, float y, Align align, AlphaTransform alpha)- Specified by:
drawTextin interfaceGraphicsContext
-
getCanvas
public Canvas getCanvas()
- Specified by:
getCanvasin interfaceGraphicsContext
-
-