mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 07:10:40 +01:00
[graph] Take margins into account for normalization
When building an orthonormal range for the automatic zoom, we provide a ratio for the screen without the margins. This way, adding the margins will make the graph orthonormal, and the banner cannot cover the function. Change-Id: If3a3f799d4e7e3e81ab77c6b418d70b734a6fbca
This commit is contained in:
committed by
LeaNumworks
parent
a8858023ba
commit
c89a7bc496
@@ -159,9 +159,11 @@ void FunctionGraphController::interestingRanges(InteractiveCurveViewRange * rang
|
||||
float xMins[maxLength], xMaxs[maxLength], yMins[maxLength], yMaxs[maxLength];
|
||||
int length = functionStore()->numberOfActiveFunctions();
|
||||
|
||||
float ratio = InteractiveCurveViewRange::NormalYXRatio() / (1 + cursorTopMarginRatio() + cursorBottomMarginRatio());
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
ExpiringPointer<Function> f = functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(i));
|
||||
f->rangeForDisplay(xMins + i, xMaxs + i, yMins + i, yMaxs + i, context);
|
||||
f->rangeForDisplay(xMins + i, xMaxs + i, yMins + i, yMaxs + i, ratio, context);
|
||||
}
|
||||
|
||||
float xMin, xMax, yMin, yMax;
|
||||
|
||||
Reference in New Issue
Block a user