------------------------------------------------------------------------------
| 161 | |
| 162 | //------------------------------------------------------------------------------ |
| 163 | vtkRectf vtkChartMatrix::ComputeCurrentElementSceneRect( |
| 164 | const vtkVector2i& index, const vtkVector2f& offset, const vtkVector2f& increment) |
| 165 | { |
| 166 | const std::size_t flatIndex = this->GetFlatIndex(index); |
| 167 | vtkVector2f resize(0., 0.); |
| 168 | |
| 169 | if (this->SpecificResize.find(index) != this->SpecificResize.end()) |
| 170 | { |
| 171 | resize = this->SpecificResize[index]; |
| 172 | } |
| 173 | |
| 174 | const float x = |
| 175 | offset[0] + this->Gutter.GetX() * this->Private->GutterCompensation[flatIndex][vtkAxis::LEFT]; |
| 176 | const float y = |
| 177 | offset[1] + this->Gutter.GetX() * this->Private->GutterCompensation[flatIndex][vtkAxis::BOTTOM]; |
| 178 | |
| 179 | vtkVector2i& span = this->Private->Spans[flatIndex]; |
| 180 | float left = x + resize.GetX(); |
| 181 | float bottom = y + resize.GetY(); |
| 182 | float width = increment.GetX() * span.GetX() - resize.GetX() + |
| 183 | this->Gutter.GetX() * |
| 184 | (span.GetX() - 1 + this->Private->GutterCompensation[flatIndex][vtkAxis::RIGHT]); |
| 185 | float height = increment.GetY() * span.GetY() - resize.GetY() + |
| 186 | this->Gutter.GetY() * |
| 187 | (span.GetY() - 1 + this->Private->GutterCompensation[flatIndex][vtkAxis::TOP]); |
| 188 | |
| 189 | width = vtkMath::ClampValue(width, 0.f, VTK_FLOAT_MAX); |
| 190 | height = vtkMath::ClampValue(height, 0.f, VTK_FLOAT_MAX); |
| 191 | |
| 192 | return { left, bottom, width, height }; |
| 193 | } |
| 194 | |
| 195 | //------------------------------------------------------------------------------ |
| 196 | void vtkChartMatrix::InitLayoutTraversal( |
no test coverage detected