------------------------------------------------------------------------------
| 479 | |
| 480 | //------------------------------------------------------------------------------ |
| 481 | void 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 | } |
| 505 | VTK_ABI_NAMESPACE_END |
no test coverage detected