double GCDCGraphs::GetY(double value, DrawInfo *di) { int w, h; GetClientSize(&w, &h); h -= m_screen_margins.bottommargin + m_screen_margins.topmargin; double y = get_y_position(value, di); double ret = h - y * h + m_screen_margins.topmargin; if (ret < m_screen_margins.topmargin) ret = m_screen_margins.topmargin; if (ret > h + m_screen_margins.topmargin) ret = h + m_screen_margins.topmargin; return ret; }
long int View::GetY(double value) const { int w, h; GetSize(&w, &h); h -= m_bottommargin + m_topmargin; double y = get_y_position(value, m_draw->GetDrawInfo()); int ret = int(h - y * h) + m_topmargin; if (ret < m_topmargin) ret = m_topmargin; if (ret > h + m_topmargin) ret = h + m_topmargin; return ret; }