Skip to content
Snippets Groups Projects
Commit f5d936bc authored by Pascal Engeler's avatar Pascal Engeler
Browse files

notes on drawer

parent 6cfdff4b
No related branches found
No related tags found
No related merge requests found
......@@ -84,9 +84,37 @@ Todo
- **Files**
[drawer.hpp](include/drawer.hpp), [drawer.cpp](src/drawer.cpp)
- **Description**
A `Drawer` is an object that can draw segments to the screen. It handles single touch of the `Zeichnen` functionality.
A `Drawer` is an object that can draw segments to the screen.
It handles single touch of the `Zeichnen` functionality.
Note that this class relies on the caller to its methods to take care of the Opengl state (using shaders, binding buffers, etc.).
See `DrawingHandler` for more information on how this class is to be used.
- **Constructors and Destructors**
- `Drawer(Toolbox&)`
- `Drawer(const Drawer&)`
- `~Drawer()`
- **Public Function Members**
- `void start_drawing(const float x, const float y)`
- `bool draw(const float x, const float y, Toolbox& tb, bool drawing)`
- `void redraw(Toolbox&)`
- `void erase(const float x, const float y, Toolbox& tb)`
- `int num_drawn()`
- **Private Function Members**
- `bool calculate_points_(Toolbox& tb, bool drawing)`
- **Public Data Members**
- **Private Data Members**
- `float x0_, y0_, x1_, y1_`
- `int num_drawn_`
- `std::vector<float> points_`
- **Notes**
### DrawingHandler (`drawing_handler.hpp`, `drawing_handler.cpp`)
Todo
### EfficientBlock (`efficient_block.hpp`, `efficient_block.cpp`)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment