接口 Renderer
- 所有已知实现类:
ConsoleRenderer
,RemoteRendererProxy
,SvgRenderer
,SwingRenderer
,ThirdPartyRendererAdapter
public interface Renderer
Renderer interface for implementing the Bridge pattern.
This interface defines methods for rendering different shapes.
-
方法概要
修饰符和类型方法说明void
clear()
Clear the rendering surfacevoid
display()
Display the rendered contentdefault int
Get the height of the rendering areadefault int
getWidth()
Get the width of the rendering areavoid
renderCircle
(Circle circle) Render a circlevoid
renderLine
(Line line) Render a linevoid
renderRectangle
(Rectangle rectangle) Render a rectanglevoid
renderTriangle
(Triangle triangle) Render a triangle
-
方法详细资料
-
renderCircle
Render a circle- 参数:
circle
- the circle to render
-
renderRectangle
Render a rectangle- 参数:
rectangle
- the rectangle to render
-
renderLine
Render a line- 参数:
line
- the line to render
-
renderTriangle
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
-