Class TeaGraphicsContext
- java.lang.Object
-
- nl.colorize.multimedialib.renderer.teavm.TeaGraphicsContext
-
- All Implemented Interfaces:
GraphicsContext2D
public class TeaGraphicsContext extends java.lang.Object implements GraphicsContext2D
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.GraphicsContext2D
drawCircle, drawCircle, drawImage, drawPolygon, drawPolygon, drawRect, drawRect, drawSprite, drawText, drawText, fillImage, getCanvasHeight, getCanvasWidth
-
-
-
-
Constructor Detail
-
TeaGraphicsContext
public TeaGraphicsContext(Canvas canvas)
-
-
Method Detail
-
drawBackground
public void drawBackground(ColorRGB backgroundColor)
- Specified by:
drawBackgroundin interfaceGraphicsContext2D
-
drawRect
public void drawRect(Rect rect, ColorRGB color, AlphaTransform alpha)
- Specified by:
drawRectin interfaceGraphicsContext2D
-
drawCircle
public void drawCircle(Circle circle, ColorRGB color, AlphaTransform alpha)
- Specified by:
drawCirclein interfaceGraphicsContext2D
-
drawPolygon
public void drawPolygon(Polygon polygon, ColorRGB color, AlphaTransform alpha)
- Specified by:
drawPolygonin interfaceGraphicsContext2D
-
drawImage
public void drawImage(Image image, float x, float y, Transform transform)
- Specified by:
drawImagein interfaceGraphicsContext2D
-
drawText
public void drawText(java.lang.String text, TTFont font, float x, float y, Align align, AlphaTransform alpha)- Specified by:
drawTextin interfaceGraphicsContext2D
-
getCanvas
public Canvas getCanvas()
- Specified by:
getCanvasin interfaceGraphicsContext2D
-
-