diff options
author | neoraider <devnull@localhost> | 2008-01-17 22:13:00 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-01-17 22:13:00 +0100 |
commit | 7f879850b5e4cf57b95c169238617c199e431cc7 (patch) | |
tree | f31949ab2ded4c5787e935695fc2bac06fc98785 /Renderer.cpp | |
parent | 0698046e5089e814fcf307a552f716f21f2ff9c0 (diff) | |
download | zoomedit-7f879850b5e4cf57b95c169238617c199e431cc7.tar zoomedit-7f879850b5e4cf57b95c169238617c199e431cc7.zip |
zoomedit: Added scales to drawing area.
Diffstat (limited to 'Renderer.cpp')
-rw-r--r-- | Renderer.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/Renderer.cpp b/Renderer.cpp index 4954133..98859d9 100644 --- a/Renderer.cpp +++ b/Renderer.cpp @@ -9,13 +9,11 @@ void Renderer::drawGrid(const Rectangle &rect, float scale) { float step = powf(0.1f, depth2); float f; int i; - //gchar *string; float x1 = rect.getVertex1().getX(), y1 = rect.getVertex1().getY(); float x2 = rect.getVertex2().getX(), y2 = rect.getVertex2().getY(); glBegin(GL_LINES); - //cairo_set_font_size(cr, 10.0/scale); for(i = 0; 0.4f*(depth-depth2+i-1) < 0.5f; i++) { f = fminf(0.4f*(depth-depth2+i), 0.5f); @@ -24,35 +22,11 @@ void Renderer::drawGrid(const Rectangle &rect, float scale) { for(f = x1 - fmodf(x1, step) - step; f <= x2; f+=step) { glVertex2f(f, y1); glVertex2f(f, y2); - - /*if(step > 0.005) { - if(step > 0.5) - string = g_strdup_printf("%i", (int)rint(d)); - else - string = g_strdup_printf("%.*f", -(int)floor(log10(step*1.1)), d+step/10); - - cairo_move_to(cr, d+1/scale, y1+11/scale); - cairo_show_text(cr, string); - - g_free(string); - }*/ } for(f = y1 - fmodf(y1, step) - step; f <= y2; f+=step) { glVertex2f(x1, f); glVertex2f(x2, f); - - /*if(step > 0.005) { - if(step > 0.5) - string = g_strdup_printf("%i", (int)rint(d)); - else - string = g_strdup_printf("%.*f", -(int)floor(log10(step*1.1)), d+step/10); - - cairo_move_to(cr, x1+3/scale, d+11/scale); - cairo_show_text(cr, string); - - g_free(string); - }*/ } step *= 10; |