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

Method DrawPath

Rendering/GL2PSOpenGL2/vtkOpenGLGL2PSHelperImpl.cxx:425–451  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

423
424//------------------------------------------------------------------------------
425void vtkOpenGLGL2PSHelperImpl::DrawPath(vtkPath* path, double rasterPos[3], double windowPos[2],
426 unsigned char rgba[4], double scale[2], double rotateAngle, float strokeWidth, const char* label)
427{
428 // Replace newlines in label -- these will throw off the comments.
429 std::string l(label ? label : "");
430 size_t idx = 0;
431 while ((idx = l.find('\n', idx)) != std::string::npos)
432 {
433 l.replace(idx, 1, "\\n");
434 }
435
436 switch (gl2psGetFileFormat())
437 {
438 case GL2PS_PS:
439 case GL2PS_EPS:
440 this->DrawPathPS(path, rasterPos, windowPos, rgba, scale, rotateAngle, strokeWidth, l);
441 break;
442 case GL2PS_SVG:
443 this->DrawPathSVG(path, rasterPos, windowPos, rgba, scale, rotateAngle, strokeWidth, l);
444 break;
445 case GL2PS_PDF:
446 this->DrawPathPDF(path, rasterPos, windowPos, rgba, scale, rotateAngle, strokeWidth, l);
447 break;
448 default:
449 break;
450 }
451}
452
453//------------------------------------------------------------------------------
454void vtkOpenGLGL2PSHelperImpl::Draw3DPath(vtkPath* path, vtkMatrix4x4* actorMatrix,

Callers 4

DrawStringMethod · 0.95
Draw3DPathMethod · 0.95
DrawCircleGL2PSMethod · 0.45
DrawWedgeGL2PSMethod · 0.45

Calls 5

DrawPathPSMethod · 0.95
DrawPathSVGMethod · 0.95
DrawPathPDFMethod · 0.95
gl2psGetFileFormatFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected