接口 Renderer

所有已知实现类:
ConsoleRenderer, RemoteRendererProxy, SvgRenderer, SwingRenderer, ThirdPartyRendererAdapter

public interface Renderer
Renderer interface for implementing the Bridge pattern. This interface defines methods for rendering different shapes.
  • 方法详细资料

    • renderCircle

      void renderCircle(Circle circle)
      Render a circle
      参数:
      circle - the circle to render
    • renderRectangle

      void renderRectangle(Rectangle rectangle)
      Render a rectangle
      参数:
      rectangle - the rectangle to render
    • renderLine

      void renderLine(Line line)
      Render a line
      参数:
      line - the line to render
    • renderTriangle

      void renderTriangle(Triangle triangle)
      Render a triangle
      参数:
      triangle - the triangle to render
    • clear

      void clear()
      Clear the rendering surface
    • display

      void display()
      Display the rendered content
    • getWidth

      default int getWidth()
      Get the width of the rendering area
      返回:
      the width
    • getHeight

      default int getHeight()
      Get the height of the rendering area
      返回:
      the height