类 MockThirdPartyRenderer
java.lang.Object
com.example.graphics.adapter.MockThirdPartyRenderer
- 所有已实现的接口:
ThirdPartyRenderer
Mock implementation of the ThirdPartyRenderer interface.
This simulates a third-party rendering library.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
Clear the rendering surfacevoid
drawCircle
(double centerX, double centerY, double radius) Draw a circle in the third-party renderervoid
drawLine
(double startX, double startY, double endX, double endY) Draw a line in the third-party renderervoid
drawPolygon
(int[] xPoints, int[] yPoints, int nPoints) Draw a polygon in the third-party renderervoid
drawRect
(double x, double y, double width, double height) Draw a rectangle in the third-party renderervoid
Update the display
-
构造器详细资料
-
MockThirdPartyRenderer
public MockThirdPartyRenderer()
-
-
方法详细资料
-
drawCircle
public void drawCircle(double centerX, double centerY, double radius) 从接口复制的说明:ThirdPartyRenderer
Draw a circle in the third-party renderer- 指定者:
drawCircle
在接口中ThirdPartyRenderer
- 参数:
centerX
- the x coordinate of the centercenterY
- the y coordinate of the centerradius
- the radius of the circle
-
drawRect
public void drawRect(double x, double y, double width, double height) 从接口复制的说明:ThirdPartyRenderer
Draw a rectangle in the third-party renderer- 指定者:
drawRect
在接口中ThirdPartyRenderer
- 参数:
x
- the x coordinate of the top-left cornery
- the y coordinate of the top-left cornerwidth
- the width of the rectangleheight
- the height of the rectangle
-
drawLine
public void drawLine(double startX, double startY, double endX, double endY) 从接口复制的说明:ThirdPartyRenderer
Draw a line in the third-party renderer- 指定者:
drawLine
在接口中ThirdPartyRenderer
- 参数:
startX
- the x coordinate of the start pointstartY
- the y coordinate of the start pointendX
- the x coordinate of the end pointendY
- the y coordinate of the end point
-
drawPolygon
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints) 从接口复制的说明:ThirdPartyRenderer
Draw a polygon in the third-party renderer- 指定者:
drawPolygon
在接口中ThirdPartyRenderer
- 参数:
xPoints
- the x coordinates of the verticesyPoints
- the y coordinates of the verticesnPoints
- the number of vertices
-
clearSurface
public void clearSurface()从接口复制的说明:ThirdPartyRenderer
Clear the rendering surface- 指定者:
clearSurface
在接口中ThirdPartyRenderer
-
refreshDisplay
public void refreshDisplay()从接口复制的说明:ThirdPartyRenderer
Update the display- 指定者:
refreshDisplay
在接口中ThirdPartyRenderer
-