VTK
vtkFreeTypeStringToImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFreeTypeStringToImage.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 
25 #ifndef vtkFreeTypeStringToImage_h
26 #define vtkFreeTypeStringToImage_h
27 
28 #include "vtkRenderingFreeTypeModule.h" // For export macro
29 #include "vtkStringToImage.h"
30 #include "vtkSmartPointer.h" // For SP ivars
31 
32 class VTKRENDERINGFREETYPE_EXPORT vtkFreeTypeStringToImage : public vtkStringToImage
33 {
34 public:
36  void PrintSelf(ostream &os, vtkIndent indent) override;
37 
39 
41 
55  const vtkUnicodeString& string, int dpi) override;
57  const vtkStdString& string, int dpi) override;
59 
61 
69  const vtkUnicodeString& string, int dpi,
71  int textDims[2] = nullptr) override;
73  const vtkStdString& string, int dpi,
75  int textDims[2] = nullptr) override;
77 
82  void SetScaleToPowerOfTwo(bool scale) override;
83 
88 
89 protected:
92 
93  class Internals;
94  Internals* Implementation;
95 
96 private:
98  void operator=(const vtkFreeTypeStringToImage &) = delete;
99 };
100 
101 #endif //vtkFreeTypeStringToImage_h
vtkFreeTypeStringToImage::New
static vtkFreeTypeStringToImage * New()
vtkX3D::scale
@ scale
Definition: vtkX3D.h:229
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkFreeTypeStringToImage::GetBounds
vtkVector2i GetBounds(vtkTextProperty *property, const vtkStdString &string, int dpi) override
vtkStringToImage
base class for classes that render supplied text to an image.
Definition: vtkStringToImage.h:38
vtkFreeTypeStringToImage::SetScaleToPowerOfTwo
void SetScaleToPowerOfTwo(bool scale) override
Should we produce images at powers of 2, makes rendering on old OpenGL hardware easier.
vtkFreeTypeStringToImage::GetBounds
vtkVector2i GetBounds(vtkTextProperty *property, const vtkUnicodeString &string, int dpi) override
Given a text property and a string, get the bounding box [xmin, xmax] x [ymin, ymax].
vtkFreeTypeStringToImage::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkFreeTypeStringToImage::Implementation
Internals * Implementation
Definition: vtkFreeTypeStringToImage.h:93
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkUnicodeString
String class that stores Unicode text.
Definition: vtkUnicodeString.h:73
vtkFreeTypeStringToImage::~vtkFreeTypeStringToImage
~vtkFreeTypeStringToImage() override
vtkSmartPointer.h
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:40
vtkStringToImage.h
vtkFreeTypeStringToImage::RenderString
int RenderString(vtkTextProperty *property, const vtkStdString &string, int dpi, vtkImageData *data, int textDims[2]=nullptr) override
vtkFreeTypeStringToImage::vtkFreeTypeStringToImage
vtkFreeTypeStringToImage()
vtkVector2i
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:409
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:41
vtkFreeTypeStringToImage::DeepCopy
void DeepCopy(vtkFreeTypeStringToImage *utility)
Make a deep copy of the supplied utility class.
vtkFreeTypeStringToImage
render the supplied text to an image.
Definition: vtkFreeTypeStringToImage.h:33
vtkFreeTypeStringToImage::RenderString
int RenderString(vtkTextProperty *property, const vtkUnicodeString &string, int dpi, vtkImageData *data, int textDims[2]=nullptr) override
Given a text property and a string, this function initializes the vtkImageData *data and renders it i...