VTK  9.2.6
vtkMathTextFreeTypeTextRenderer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMathTextFreeTypeTextRenderer.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
31 #ifndef vtkMathTextFreeTypeTextRenderer_h
32 #define vtkMathTextFreeTypeTextRenderer_h
33 
34 #include "vtkRenderingFreeTypeModule.h" // For export macro
35 #include "vtkTextRenderer.h"
36 
37 class vtkFreeTypeTools;
39 
40 class VTKRENDERINGFREETYPE_EXPORT vtkMathTextFreeTypeTextRenderer : public vtkTextRenderer
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
49 
52  bool FreeTypeIsSupported() override;
53  bool MathTextIsSupported() override;
55 
56 protected:
59 
61 
65  vtkTextProperty* tprop, const vtkStdString& str, int bbox[4], int dpi, int backend) override;
66  bool GetMetricsInternal(vtkTextProperty* tprop, const vtkStdString& str, Metrics& metrics,
67  int dpi, int backend) override;
69  int textDims[2], int dpi, int backend) override;
71  int targetWidth, int targetHeight, int dpi, int backend) override;
73  vtkTextProperty* tprop, const vtkStdString& str, vtkPath* path, int dpi, int backend) override;
74  void SetScaleToPowerOfTwoInternal(bool scale) override;
76 
77 private:
79  void operator=(const vtkMathTextFreeTypeTextRenderer&) = delete;
80 
81  vtkFreeTypeTools* FreeTypeTools;
82  vtkMathTextUtilities* MathTextUtilities;
83 };
84 
85 #endif // vtkMathTextFreeTypeTextRenderer_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool RenderStringInternal(vtkTextProperty *tprop, const vtkStdString &str, vtkImageData *data, int textDims[2], int dpi, int backend)=0
Virtual methods for concrete implementations of the public methods.
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:35
virtual bool GetMetricsInternal(vtkTextProperty *tprop, const vtkStdString &str, Metrics &metrics, int dpi, int backend)=0
Virtual methods for concrete implementations of the public methods.
virtual bool GetBoundingBoxInternal(vtkTextProperty *tprop, const vtkStdString &str, int bbox[4], int dpi, int backend)=0
Virtual methods for concrete implementations of the public methods.
Default implementation of vtkTextRenderer.
static vtkTextRenderer * New()
This is a singleton pattern New.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int GetConstrainedFontSizeInternal(const vtkStdString &str, vtkTextProperty *tprop, int targetWidth, int targetHeight, int dpi, int backend)=0
Virtual methods for concrete implementations of the public methods.
virtual bool MathTextIsSupported()
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
represent text properties.
virtual bool FreeTypeIsSupported()
Test for availability of various backends.
Interface for generating images and path data from string data, using multiple backends.
virtual void SetScaleToPowerOfTwoInternal(bool scale)=0
Virtual methods for concrete implementations of the public methods.
Abstract interface to equation rendering.
virtual bool StringToPathInternal(vtkTextProperty *tprop, const vtkStdString &str, vtkPath *path, int dpi, int backend)=0
Virtual methods for concrete implementations of the public methods.
FreeType library support.