|
Hi all, I am trying to use zooming function but I am stuck. |
Posted by Kaiden Kwon on Jun-13-2013 15:10 |
|
Hi all,
I am new to CD.
I need to have my charts with zooming functions.
so I am currently studying, well, trying to study the :simple zoom and scroll".
I made a new project and declared all the variables and functions,
but can't find where or what "floor" and "ceil" are.
Can you help me please?!
thank you in advance!!
//part of simplezoomscroll.cpp
.....
void CSimplezoomscrollDlg::drawChart(CChartViewer *viewer)
{
// Get the start date and end date that are visible on the chart.
double viewPortStartDate = viewer->getValueAtViewPort("x", viewer-
>getViewPortLeft());
double viewPortEndDate = viewer->getValueAtViewPort("x", viewer->getViewPortLeft() +
viewer->getViewPortWidth());
// Get the array indexes that corresponds to the visible start and end dates
int startIndex = (int)floor(Chart::bSearch(m_timeStamps, viewPortStartDate));
^
int endIndex = (int)ceil(Chart::bSearch(m_timeStamps, viewPortEndDate));
^
int noOfPoints = endIndex - startIndex + 1; |
Re: No need Peter! it's settled! :) |
Posted by Kaiden Kwon on Jun-13-2013 21:15 |
|
No need Peter! it's settled! |
|