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

Method UpdateImage

Rendering/Core/vtkTextMapper.cxx:481–504  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

479
480//------------------------------------------------------------------------------
481void vtkTextMapper::UpdateImage(int dpi)
482{
483 vtkDebugMacro(<< "UpdateImage called");
484 if (this->MTime > this->Image->GetMTime() || this->RenderedDPI != dpi ||
485 this->TextProperty->GetMTime() > this->Image->GetMTime())
486 {
487 vtkTextRenderer* tren = vtkTextRenderer::GetInstance();
488 if (tren)
489 {
490 if (!tren->RenderString(this->TextProperty, this->Input ? this->Input : std::string(),
491 this->Image, this->TextDims, dpi))
492 {
493 vtkErrorMacro(<< "Texture generation failed.");
494 }
495 this->RenderedDPI = dpi;
496 vtkDebugMacro(<< "Text rendered to " << this->TextDims[0] << ", " << this->TextDims[1]
497 << " buffer.");
498 }
499 else
500 {
501 vtkErrorMacro(<< "Could not locate vtkTextRenderer object.");
502 }
503 }
504}
505VTK_ABI_NAMESPACE_END

Callers 2

GetSizeMethod · 0.95
RenderOverlayMethod · 0.95

Calls 3

stringClass · 0.50
GetMTimeMethod · 0.45
RenderStringMethod · 0.45

Tested by

no test coverage detected