mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/curve_view] Clean grid unit algorithm
This commit is contained in:
@@ -36,7 +36,6 @@ public:
|
||||
void setOkView(View * okView);
|
||||
void setForceOkDisplay(bool force) { m_forceOkDisplay = force; }
|
||||
float resolution() const;
|
||||
static float LabelsMarginRatio(Axis axis) { return axis == Axis::Horizontal ? k_labelsHorizontalMarginRatio : 0.0f; }
|
||||
protected:
|
||||
CurveViewRange * curveViewRange() { return m_curveViewRange; }
|
||||
void setCurveViewRange(CurveViewRange * curveViewRange);
|
||||
|
||||
@@ -19,9 +19,7 @@ float CurveViewRange::yGridUnit() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float CurveViewRange::computeGridUnit(Axis axis, float range1) {
|
||||
float marginRatio = CurveView::LabelsMarginRatio(axis == Axis::X ? CurveView::Axis::Horizontal : CurveView::Axis::Vertical);
|
||||
float range = range1 * (1.0f-2.0f*marginRatio);
|
||||
float CurveViewRange::computeGridUnit(Axis axis, float range) {
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
float maxNumberOfUnits = (axis == Axis::X) ? k_maxNumberOfXGridUnits : k_maxNumberOfYGridUnits;
|
||||
|
||||
Reference in New Issue
Block a user