VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDefaultTextLayout.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
14 #include <vrvUtil/DtUnicode.h>
15 
16 #include <unordered_map>
17 
18 namespace makVrv
19 {
20  class DtFreeTypeFace;
21  struct DtObserverRenderData;
22 
24  {
25  public:
28 
30  virtual ~DtDefaultTextLayout();
31 
34  const DtDefaultTextLayout &other) = delete;
35 
37  DtDefaultTextLayout &operator=(
38  const DtDefaultTextLayout &other) = delete;
39 
40  public:
41 
43  virtual void renderText(DtTexturedGlyphRenderer*, const DtTextProxy*, DtFontInterface* font, const DtBoundingBox& bBox,
44  const DtObserverRenderData& channelRenderData,
45  int proxyIndex, DtQuadsRenderData* renderData);
46 
55  virtual DtBoundingBox calculateBoundingBox(DtFontInterface* font, const DtUnicode& string,
56  const DtPen& pen = DtPen(), unsigned int pos = 0, int len = -1) const;
57 
58  virtual bool isShaped(void) const{ return false; }
59  protected:
60  virtual void renderString(DtGlyphRenderer& renderer, DtPen& pen
61  , const DtTextProxy* textProxy, DtFontInterface* font, unsigned int pos, int len, int& vertexIndex
62  , const std::unordered_map<unsigned int, int>& mapTextureIdToTextureIndex, double observerTopographicHeading);
63 
64  virtual void renderString(DtGlyphRenderer& renderer, DtPen& pen
65  , const DtTextProxy* textProxy, DtFontInterface* font, unsigned int pos, int len
66  , float lineLength, int& vertexIndex
67  , const std::unordered_map<unsigned int, int>& mapTextureIdToTextureIndex, double observerTopographicHeading);
68 
69  virtual void renderStringAndWhiteSpace(
70  DtGlyphRenderer& renderer, const DtPen& pen, const DtTextProxy* textProxy,
71  DtFontInterface* font, unsigned int pos, int len, const float extraSpace, int& vertexIndex
72  , const std::unordered_map<unsigned int, int>& mapTextureIdToTextureIndex, double observerTopographicHeading);
73 
74  virtual void renderWrappedText(DtGlyphRenderer& renderer,
75  const DtPen& pen, DtFont::TextAlignment alignment, const DtTextProxy* textProxy,
76  DtFontInterface* font, unsigned int pos, int len, const float lineLength, const float wordWidth, int& vertexIndex
77  , const std::unordered_map<unsigned int, int>& mapTextureIdToTextureIndex, double observerTopographicHeading);
78  };
79 }
80 
Generic base class for text layout renderers.
Definition: DtTextLayoutInterface.h:26
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
TextAlignment
Definition: DtFontInterface.h:26
Contains the makVrv::DtTextLayoutInterface class declaration.
A glyph renderer which renders the texture associated with a glyph.
Definition: DtTexturedGlyphRenderer.h:28
A class for controlling text owned by the TextRenderer.
Definition: DtTextProxy.h:33
Abstract class for handling glyph rendering.
Definition: DtGlyphRenderer.h:21
Definition: DtDefaultTextLayout.h:23
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
A class with encapsulated a font loaded from disk with a given size.
Definition: DtFontInterface.h:22
Definition: DtCommonRenderData.h:19
A pen object with parameters on how to draw text.
Definition: DtBoundingBox.h:80
virtual bool isShaped(void) const
Definition: DtDefaultTextLayout.h:58
Definition: DtCommonRenderData.h:32
A simple bounding box.
Definition: DtBoundingBox.h:101

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)