mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps] Remove "Preadjustments" menu for curves
Change-Id: I1a30efd502c5db36325d87fa0f1dffacc37a4f1c
This commit is contained in:
committed by
Émilie Feral
parent
d2b36be846
commit
5a07db3452
@@ -15,23 +15,6 @@ CurveViewRange::CurveViewRange(InteractiveCurveViewRangeDelegate * delegate) :
|
||||
MemoizedCurveViewRange::protectedSetXMin(-k_displayLeftMarginRatio * xMax(), k_lowerMaxFloat, k_upperMaxFloat);
|
||||
}
|
||||
|
||||
void CurveViewRange::roundAbscissa() {
|
||||
int roundedXMean = std::round(xCenter());
|
||||
float halfScreenWidth = ((float)Ion::Display::Width)/2.0f;
|
||||
float newXMin = roundedXMean - halfScreenWidth;
|
||||
float newXMax = roundedXMean + halfScreenWidth - 1.0f;
|
||||
float interestingXMin = m_delegate->interestingXMin();
|
||||
if (newXMin < interestingXMin) {
|
||||
newXMin = interestingXMin - k_displayLeftMarginRatio * (float)Ion::Display::Width;
|
||||
newXMax = newXMin + (float)Ion::Display::Width;
|
||||
}
|
||||
if (std::isnan(newXMin) || std::isnan(newXMax)) {
|
||||
return;
|
||||
}
|
||||
m_xRange.setMax(newXMax, k_lowerMaxFloat, k_upperMaxFloat);
|
||||
setXMin(newXMin);
|
||||
}
|
||||
|
||||
void CurveViewRange::normalize() {
|
||||
float xMean = xCenter();
|
||||
float yMean = yCenter();
|
||||
@@ -63,16 +46,4 @@ void CurveViewRange::normalize() {
|
||||
}
|
||||
}
|
||||
|
||||
void CurveViewRange::setTrigonometric() {
|
||||
float interestingXMin = m_delegate->interestingXMin();
|
||||
float interestingXRange = Preferences::sharedPreferences()->angleUnit() == Preferences::AngleUnit::Degree ? 1200.0f : 21.0f;
|
||||
m_xRange.setMax(interestingXMin + interestingXRange, k_lowerMaxFloat, k_upperMaxFloat);
|
||||
MemoizedCurveViewRange::protectedSetXMin(interestingXMin - k_displayLeftMarginRatio * interestingXRange, k_lowerMaxFloat, k_upperMaxFloat);
|
||||
|
||||
m_yAuto = false;
|
||||
constexpr float y = 1.6f;
|
||||
m_yRange.setMax(y, k_lowerMaxFloat, k_upperMaxFloat);
|
||||
MemoizedCurveViewRange::protectedSetYMin(-y, k_lowerMaxFloat, k_upperMaxFloat);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ namespace Sequence {
|
||||
class CurveViewRange : public Shared::InteractiveCurveViewRange {
|
||||
public:
|
||||
CurveViewRange(Shared::InteractiveCurveViewRangeDelegate * delegate = nullptr);
|
||||
void roundAbscissa() override;
|
||||
void normalize() override;
|
||||
void setTrigonometric() override;
|
||||
private:
|
||||
constexpr static float k_displayLeftMarginRatio = 0.1f;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user