diff --git a/README.md b/README.md index 448b91fe8376426edacc6276b1a0ca11f8cefedb..147223b92f538c96a1064d6c78bbf6d6581f99b2 100644 --- a/README.md +++ b/README.md @@ -106,27 +106,36 @@ Todo **Public Function Members** - `void start_drawing(const float x, const float y)`: - - <ins>Desc</ins>: + - **Description** Start drawing at coordinates (`x`, `y`) (typically fingerdown location). Doesn't draw anything. - - <ins>Pre</ins>: + - **Preconditions** - - <ins>Post</ins>: + - **Postconditions** Drawing start is set to (x, y). - - <ins>Notes</ins>: + - **Notes** Nothing is drawn by this function. (x, y) are typically the fingerdown coordinates. - `bool draw(const float x, const float y, Toolbox& tb, bool drawing)` - - *Desc*: Draw a stroke from the last position to (x, y), with strokewidth controlled by `drawing` (`true`->`tb.drawing_width`, `false`->`tb.erasing_width`). - - *Pre*: A `GL_ARRAY_BUFFER` is bound and the Opengl state is set as desired - - *Post*: The points of the new segment have been calculated, a call to `glDrawArrays` has been done to draw the segment. + - DESCRIPTION + + Draw a stroke from the last position to (x, y), with strokewidth controlled by `drawing` (`true`->`tb.drawing_width`, `false`->`tb.erasing_width`). + + - PRECONDITIONS + + A `GL_ARRAY_BUFFER` is bound and the Opengl state is set as desired + + - POSTCONDITIONS + + The points of the new segment have been calculated, a call to `glDrawArrays` has been done to draw the segment. Returns `true` if something was drawn, and `false` else (typically when new point is same as last point). - - *Notes*: + + - NOTES - `void redraw(Toolbox&)` - *Desc*: Redraws the last drawn stroke.