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

Method SetPositionAndSize

Views/Infovis/vtkParallelCoordinatesRepresentation.cxx:1910–1927  ·  view source on GitHub ↗

------------------------------------------------------------------------------ set position and size of the entire plot

Source from the content-addressed store, hash-verified

1908//------------------------------------------------------------------------------
1909// set position and size of the entire plot
1910int vtkParallelCoordinatesRepresentation::SetPositionAndSize(double* position, double* size)
1911{
1912 // rescale the Xs so that they fit into the range prescribed by position and size
1913 double oldPos[2], oldSize[2];
1914 oldPos[0] = oldPos[1] = oldSize[0] = oldSize[1] = 0.;
1915 this->GetPositionAndSize(oldPos, oldSize);
1916
1917 for (int i = 0; i < this->NumberOfAxes; i++)
1918 {
1919 this->Xs[i] = position[0] + size[0] * (this->Xs[i] - oldPos[0]) / oldSize[0];
1920 }
1921
1922 this->YMin = position[1];
1923 this->YMax = position[1] + size[1];
1924
1925 this->Modified();
1926 return 1;
1927}
1928
1929//------------------------------------------------------------------------------
1930vtkPolyDataMapper2D* vtkParallelCoordinatesRepresentation::InitializePlotMapper(

Callers 2

ZoomMethod · 0.80
PanMethod · 0.80

Calls 2

GetPositionAndSizeMethod · 0.95
ModifiedMethod · 0.45

Tested by

no test coverage detected