Class Canvas
java.lang.Object
com.acmerobotics.dashboard.canvas.Canvas
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
drawGrid
(double x, double y, double width, double height, int numTicksX, int numTicksY) drawGrid
(double x, double y, double width, double height, int numTicksX, int numTicksY, double theta, double pivotX, double pivotY, boolean usePageFrame) Draws an image served at the given path.drawImage
(String path, double x, double y, double width, double height, double theta, double pivotX, double pivotY, boolean usePageFrame) fillCircle
(double x, double y, double radius) fillPolygon
(double[] xPoints, double[] yPoints) fillRect
(double x, double y, double width, double height) setAlpha
(double alpha) Set the global alpha for subsequent operations.setRotation
(double radians) setScale
(double scaleX, double scaleY) setStrokeWidth
(int width) setTranslation
(double x, double y) strokeCircle
(double x, double y, double radius) strokeLine
(double x1, double y1, double x2, double y2) strokePolygon
(double[] xPoints, double[] yPoints) strokePolyline
(double[] xPoints, double[] yPoints) strokeRect
(double x, double y, double width, double height) strokeSpline
(double ax, double bx, double cx, double dx, double ex, double fx, double ay, double by, double cy, double dy, double ey, double fy) Deprecated.strokeText
(String text, double x, double y, String font, double theta) strokeText
(String text, double x, double y, String font, double theta, boolean usePageFrame)
-
Constructor Details
-
Canvas
public Canvas()
-
-
Method Details
-
setScale
-
setRotation
-
setTranslation
-
strokeText
-
strokeText
-
fillText
-
fillText
-
strokeCircle
-
fillCircle
-
strokePolygon
-
fillPolygon
-
strokePolyline
-
strokeLine
-
fillRect
-
strokeRect
-
strokeSpline
@Deprecated public Canvas strokeSpline(double ax, double bx, double cx, double dx, double ex, double fx, double ay, double by, double cy, double dy, double ey, double fy) Deprecated. -
setFill
-
setStroke
-
setStrokeWidth
-
drawImage
Draws an image served at the given path. All files stored in the assets images/ folder will be served under path /images/. -
drawImage
-
drawGrid
public Canvas drawGrid(double x, double y, double width, double height, int numTicksX, int numTicksY) -
drawGrid
public Canvas drawGrid(double x, double y, double width, double height, int numTicksX, int numTicksY, double theta, double pivotX, double pivotY, boolean usePageFrame) -
setAlpha
Set the global alpha for subsequent operations. -
getOperations
-
clear
public void clear()
-