diff options
author | Joel Bodenmann <joel.bodenmann@hevs.ch> | 2012-10-24 19:25:35 +0200 |
---|---|---|
committer | Joel Bodenmann <joel.bodenmann@hevs.ch> | 2012-10-24 19:25:35 +0200 |
commit | 0004d3824ba7ed532801e440a9e5dbab409f4064 (patch) | |
tree | fae119551ed36f9bc36f4bc9fd5d9cbcde852ca6 | |
parent | 875edbd44dc71fbdf5a6bb1b643c47ba68998c04 (diff) | |
download | uGFX-0004d3824ba7ed532801e440a9e5dbab409f4064.tar.gz uGFX-0004d3824ba7ed532801e440a9e5dbab409f4064.tar.bz2 uGFX-0004d3824ba7ed532801e440a9e5dbab409f4064.zip |
graphDrawDots() fix
-rw-r--r-- | src/graph.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/graph.c b/src/graph.c index 1f28695a..bac6990a 100644 --- a/src/graph.c +++ b/src/graph.c @@ -133,8 +133,12 @@ void graphDrawDot(coord_t x, coord_t y, uint16_t radius, color_t color) { void graphDrawDots(int coord[][2], uint16_t entries, uint16_t radius, uint16_t color) { uint16_t i; - for(i = 0; i < entries; i++) - gdispFillCircle(coord[i][0] + origin.x, origin.y - coord[i][1], radius, color); + for(i = 0; i < entries; i++) { + if(radius == 0) + gdispDrawPixel(coord[i][0] + origin.x, origin.y - coord[i][1], color); + else + gdispFillCircle(coord[i][0] + origin.x, origin.y - coord[i][1], radius, color); + } } void graphDrawNet(int coord[][2], uint16_t entries, uint16_t radius, uint16_t lineColor, uint16_t dotColor) { |