------------------------------------------------------------------------------
| 2936 | |
| 2937 | //------------------------------------------------------------------------------ |
| 2938 | void vtkOpenGLContextDevice2D::TransformPath(vtkPath* path) const |
| 2939 | { |
| 2940 | // Transform the path with the modelview matrix: |
| 2941 | double modelview[16]; |
| 2942 | vtkMatrix4x4::DeepCopy(modelview, this->ModelMatrix->GetMatrix()); |
| 2943 | |
| 2944 | // Transform the 2D path. |
| 2945 | float newPoint[3] = { 0, 0, 0 }; |
| 2946 | vtkPoints* points = path->GetPoints(); |
| 2947 | for (vtkIdType i = 0; i < path->GetNumberOfPoints(); ++i) |
| 2948 | { |
| 2949 | double* point = points->GetPoint(i); |
| 2950 | newPoint[0] = modelview[0] * point[0] + modelview[1] * point[1] + modelview[3]; |
| 2951 | newPoint[1] = modelview[4] * point[0] + modelview[5] * point[1] + modelview[7]; |
| 2952 | points->SetPoint(i, newPoint); |
| 2953 | } |
| 2954 | } |
| 2955 | |
| 2956 | //------------------------------------------------------------------------------ |
| 2957 | void vtkOpenGLContextDevice2D::TransformPoint(float& x, float& y) const |
no test coverage detected