接口 ThirdPartyRenderer

所有已知实现类:
MockThirdPartyRenderer

public interface ThirdPartyRenderer
Mock interface for a third-party rendering library. This represents an external API that we need to adapt.
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Clear the rendering surface
    void
    drawCircle(double centerX, double centerY, double radius)
    Draw a circle in the third-party renderer
    void
    drawLine(double startX, double startY, double endX, double endY)
    Draw a line in the third-party renderer
    void
    drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
    Draw a polygon in the third-party renderer
    void
    drawRect(double x, double y, double width, double height)
    Draw a rectangle in the third-party renderer
    void
    Update the display
  • 方法详细资料

    • drawCircle

      void drawCircle(double centerX, double centerY, double radius)
      Draw a circle in the third-party renderer
      参数:
      centerX - the x coordinate of the center
      centerY - the y coordinate of the center
      radius - the radius of the circle
    • drawRect

      void drawRect(double x, double y, double width, double height)
      Draw a rectangle in the third-party renderer
      参数:
      x - the x coordinate of the top-left corner
      y - the y coordinate of the top-left corner
      width - the width of the rectangle
      height - the height of the rectangle
    • drawLine

      void drawLine(double startX, double startY, double endX, double endY)
      Draw a line in the third-party renderer
      参数:
      startX - the x coordinate of the start point
      startY - the y coordinate of the start point
      endX - the x coordinate of the end point
      endY - the y coordinate of the end point
    • drawPolygon

      void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
      Draw a polygon in the third-party renderer
      参数:
      xPoints - the x coordinates of the vertices
      yPoints - the y coordinates of the vertices
      nPoints - the number of vertices
    • clearSurface

      void clearSurface()
      Clear the rendering surface
    • refreshDisplay

      void refreshDisplay()
      Update the display