openframeworks/openFrameworks — pull request #3316 by tgfrerer (2014-10-17 16:21:13+00:00)
Title: fixes for ofDrawGridPlane, ofDrawGrid

This is a fix for #2858, following the discussion in #3303

+ fixes issue where central axis would not be drawn when non-integer tick count specified
+ fixes ofDrawGrid API to specify stepSize and numberOfSteps rather than scale, tickNumber
+ ensures numberOfSteps be a positive integer by requiring a size_t there.
+ updates doxy documentation for ofDrawGrid, ofDrawGridPlane

Before this PR it was possible to specify non-integer floats for tick count, which did not make sense and led to undefined visual results. This PR updates the API for ofDrawGrid following the discussion in #3303 to use stepSize and numberOfSteps as the controlling arguments for the appearance of grid panes.

Its default arguments preserve the old appearance of these methods, but any calls in client code with more than the default arguments are likely to break, since this introduces an API change. Client code should be easy to update, following any compiler error messages and the updated doxygen docs.