------------------------------------------------------------------------------
| 217 | |
| 218 | //------------------------------------------------------------------------------ |
| 219 | void vtkChartMatrix::GoToNextElement(vtkVector2i& index, vtkVector2f& offset) |
| 220 | { |
| 221 | const int& numRows = this->Size.GetY(); |
| 222 | int& i = this->Private->Index[0]; |
| 223 | int& j = this->Private->Index[1]; |
| 224 | constexpr int FIRST = 0; |
| 225 | |
| 226 | // increment j |
| 227 | ++j; |
| 228 | // reset j, increment i if necessary |
| 229 | if (!(j % numRows)) |
| 230 | { |
| 231 | j = 0; |
| 232 | ++i; |
| 233 | // Compute next column's x offset |
| 234 | switch (i) |
| 235 | { |
| 236 | case FIRST: |
| 237 | break; |
| 238 | default: |
| 239 | this->Private->Offset[0] += this->Private->Increment[0] + this->Gutter[0]; |
| 240 | break; |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | // Compute next row's y offset |
| 245 | switch (j) |
| 246 | { |
| 247 | case FIRST: |
| 248 | this->Private->Offset[1] = this->Private->Start[1]; |
| 249 | break; |
| 250 | default: |
| 251 | this->Private->Offset[1] += this->Private->Increment[1] + this->Gutter[1]; |
| 252 | break; |
| 253 | } |
| 254 | |
| 255 | index = this->Private->Index; |
| 256 | offset = this->Private->Offset; |
| 257 | } |
| 258 | |
| 259 | //------------------------------------------------------------------------------ |
| 260 | bool vtkChartMatrix::IsDoneWithTraversal() |
no outgoing calls
no test coverage detected