YAxis minor-tick alignment fix

This commit is contained in:
Mark Watkins 2011-06-18 05:59:33 +10:00
parent 27b69585a3
commit 19550f28cd
4 changed files with 14 additions and 38 deletions

View File

@ -8309,7 +8309,7 @@
1308026543 D
1308334550 /home/mark/projects/git/sleepyhead/src/version.h
1308340491 /home/mark/projects/git/sleepyhead/src/version.h
1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed
<wx/dcbuffer.h>
@ -8362,7 +8362,7 @@
"sleeplib/profiles.h"
"sleeplib/machine_loader.h"
1308334546 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
1308340490 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
"freetype-gl/font-manager.h"
"freetype-gl/texture-font.h"
"graph.h"
@ -11073,8 +11073,9 @@
<GL/glx.h>
<wx/bitmap.h>
1308328238 source:/home/mark/projects/git/sleepyhead/src/graphs/gl_pbuffer.cpp
1308337622 source:/home/mark/projects/git/sleepyhead/src/graphs/gl_pbuffer.cpp
"gl_pbuffer.h"
<OpenGL/glu.h>
<GL/glu.h>
<wx/utils.h>
<wx/glcanvas.h>

View File

@ -16,13 +16,13 @@
<File name="../../src/SleepyHeadMain.h" open="1" top="0" tabpos="2">
<Cursor position="2035" topLine="47" />
</File>
<File name="../../src/graphs/gl_pbuffer.cpp" open="1" top="1" tabpos="5">
<File name="../../src/graphs/gl_pbuffer.cpp" open="1" top="0" tabpos="5">
<Cursor position="3" topLine="0" />
</File>
<File name="../../src/graphs/gl_pbuffer.h" open="1" top="0" tabpos="6">
<Cursor position="401" topLine="0" />
</File>
<File name="../../src/graphs/graph.cpp" open="1" top="0" tabpos="3">
<File name="../../src/graphs/graph.cpp" open="1" top="1" tabpos="3">
<Cursor position="2743" topLine="83" />
</File>
<File name="../../src/graphs/graph.h" open="1" top="0" tabpos="4">

View File

@ -1591,33 +1591,7 @@ void gYAxis::Plot(gGraphWindow &w,float scrx,float scry)
double min_ytick=rxy*yt;
//if (miny>=0) {
//} else {
//}
/*double max_yticks=1/max_yticksdiv;
double yy=w.max_y-w.min_y;
double ymult=height/yy;
double major_ytick=max_yticksdiv*yy;
double min_ytick,q;
if (w.min_y>=0) {
int yrounding[9]={1,2,5,10,20,30,40,50,100}; // time rounding
int ry;
for (ry=0;ry<9;ry++) {
// st=round(st2*rounding[ry])/rounding[ry];
min_ytick=round(major_ytick*yrounding[ry])/yrounding[ry];
q=yy/min_ytick; // number of ticks that fits in range
if (q<=max_yticks) break; // compared to number of ticks that fit on screen.
}
} else {
min_ytick=60;
}
if (min_ytick<=0.25)
min_ytick=0.25; */
int ty,h;
float ty,h;
const int maxverts=2048;
int vertcnt=0;
@ -1626,6 +1600,7 @@ void gYAxis::Plot(gGraphWindow &w,float scrx,float scry)
glColor4ub(linecol1.Red(),linecol1.Green(),linecol1.Blue(),linecol1.Alpha());
glLineWidth(1);
for (double i=miny+(min_ytick/2.0); i<maxy; i+=min_ytick) {
ty=(i - miny) * ymult;
h=(start_py+height)-ty;

View File

@ -16,14 +16,14 @@ namespace AutoVersion{
//Standard Version Type
static const long _MAJOR = 0;
static const long _MINOR = 7;
static const long _BUILD = 6617;
static const long _REVISION = 19423;
static const long _BUILD = 6619;
static const long _REVISION = 19437;
//Miscellaneous Version Types
static const long _BUILDS_COUNT = 8015;
#define _RC_FILEVERSION 0,7,6617,19423
#define _RC_FILEVERSION_STRING "0, 7, 6617, 19423\0"
static const char _FULLVERSION_STRING[] = "0.7.6617.19423";
static const long _BUILDS_COUNT = 8025;
#define _RC_FILEVERSION 0,7,6619,19437
#define _RC_FILEVERSION_STRING "0, 7, 6619, 19437\0"
static const char _FULLVERSION_STRING[] = "0.7.6619.19437";
//These values are to keep track of your versioning state, don't modify them.
static const long _BUILD_HISTORY = 0;