| 13 | * Drawers draw data onto an output of some sort, usually a DOM element. |
| 14 | */ |
| 15 | export interface IDrawer { |
| 16 | /** |
| 17 | * Mutate the surface to reflect the data being passed in. This method is responsible |
| 18 | * for calling the animators at the right time and order. |
| 19 | * @param data The data to be drawn. |
| 20 | * @param drawSteps The draw steps that the data go through. |
| 21 | */ |
| 22 | draw(data: any[], drawSteps: AppliedDrawStep[]): void; |
| 23 | |
| 24 | /** |
| 25 | * Get the the last drawn visual primitives. |
| 26 | */ |
| 27 | getVisualPrimitives(): Element[]; |
| 28 | |
| 29 | /** |
| 30 | * Get the visual primitive for the given *data* index. |
| 31 | */ |
| 32 | getVisualPrimitiveAtIndex(index: number): Element; |
| 33 | |
| 34 | /** |
| 35 | * Called when the Drawer is no longer needed - implementors may use this to cleanup |
| 36 | * any resources they've created |
| 37 | */ |
| 38 | remove(): void; |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * A Drawer is a stateful class that holds one SVGDrawer and one CanvasDrawer, and can switch between |
no outgoing calls
no test coverage detected