MCPcopy Create free account
hub / github.com/Kitware/VTK / PaintRect

Method PaintRect

Charts/Core/vtkChartParallelCoordinates.cxx:295–309  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

293
294//------------------------------------------------------------------------------
295bool vtkChartParallelCoordinates::PaintRect(vtkContext2D* painter, int axis, float min, float max)
296{
297 if (axis < 0)
298 return false;
299 painter->GetBrush()->SetColor(200, 20, 20, 220);
300 float x = this->Storage->Axes[axis]->GetPoint1()[0] - 5;
301 float y = min;
302 y *= this->Storage->Transform->GetMatrix()->GetElement(1, 1);
303 y += this->Storage->Transform->GetMatrix()->GetElement(1, 2);
304 float height = max - min;
305 height *= this->Storage->Transform->GetMatrix()->GetElement(1, 1);
306
307 painter->DrawRect(x, y, 10, height);
308 return true;
309}
310
311//------------------------------------------------------------------------------
312void vtkChartParallelCoordinates::SetColumnVisibility(const vtkStdString& name, bool visible)

Callers 1

PaintMethod · 0.95

Calls 5

DrawRectMethod · 0.80
SetColorMethod · 0.45
GetBrushMethod · 0.45
GetPoint1Method · 0.45
GetMatrixMethod · 0.45

Tested by

no test coverage detected