mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-09 03:24:59 -06:00
ScatterDraw: Some adjustments
git-svn-id: svn://ultimatepp.org/upp/trunk@12519 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
05f7848f9a
commit
f9e9eaf8d4
2 changed files with 4 additions and 5 deletions
|
|
@ -1317,10 +1317,10 @@ void ScatterDraw::DoZoom(double scale, bool mouseX, bool mouseY) {
|
|||
}
|
||||
xRange *= scale;
|
||||
double xmun = xRange/xMajorUnit;
|
||||
if (xmun > 2*xMajorUnitNum) {
|
||||
if (xmun > 1.2*xMajorUnitNum) {
|
||||
xMajorUnit *= 2;
|
||||
xMinUnit = xMinUnit0;
|
||||
} else if (xmun < xMajorUnitNum/2) {
|
||||
} else if (xmun < xMajorUnitNum/1.5) {
|
||||
xMajorUnit /= 2;
|
||||
xMinUnit = xMinUnit0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1299,8 +1299,7 @@ bool ScatterDraw::PlotTexts(T& w, const bool boldX, bool boldY)
|
|||
Upp::Font fontY2Num = fontYNum;
|
||||
fontY2Num.Italic();
|
||||
|
||||
debug_h();
|
||||
if (drawXReticle)
|
||||
if (drawXReticle)
|
||||
for(int i = 0; xMinUnit + i*xMajorUnit <= xRange; i++) {
|
||||
double reticleX = plotW*xMinUnit/xRange + i*plotW/(xRange/xMajorUnit);
|
||||
double gridX = xMinUnit + i*xMajorUnit + xMin;
|
||||
|
|
@ -1326,7 +1325,7 @@ debug_h();
|
|||
fround(gridWidth*plotScaleAvg), axisColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (drawYReticle)
|
||||
for(int i = 0; yMinUnit + i*yMajorUnit <= yRange; i++) {
|
||||
int reticleY = fround(-plotH*yMinUnit/yRange + plotH - i*plotH/(yRange/yMajorUnit));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue