VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTextLayoutInterface.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 #include <vrvGraphics/DtFont.h>
15 
16 #include <vrvUtil/DtUnicode.h>
17 
18 namespace makVrv
19 {
20  class DtTextProxy;
21  class DtTexturedGlyphRenderer;
22 
25  {
26  public:
29 
31  virtual ~DtTextLayoutInterface() {};
32 
35  const DtTextLayoutInterface &other) = delete;
36 
38  DtTextLayoutInterface &operator=(
39  const DtTextLayoutInterface &other) = delete;
40 
42  virtual void renderText(DtTexturedGlyphRenderer*, const DtTextProxy*, DtFontSP, const DtBoundingBox&) = 0;
43 
45  virtual Dt2dPoint calculateGlyphSize(const DtFontSP& font, const DtPen& pen,
46  const DtUnicode& string, unsigned int pos, int len) const = 0;
47 
49  virtual DtBoundingBox calculateBoundingBox(const DtFontSP& font, const DtPen& pen,
50  const DtUnicode& string, unsigned int pos = 0, int len = -1) const = 0;
51 
52  virtual bool isShaped(void) const = 0;
53  };
54 }
Generic base class for text layout renderers.
Definition: DtTextLayoutInterface.h:24
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
A 2D point.
Definition: DtBoundingBox.h:19
A glyph renderer which renders the texture associated with a glyph.
Definition: DtTexturedGlyphRenderer.h:25
A class for controlling text owned by the TextRenderer.
Definition: DtTextRenderer.h:197
Contains makVrv::DtFontManager class.
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
DtTextLayoutInterface()
CTOR.
Definition: DtTextLayoutInterface.h:28
boost::shared_ptr< DtFont > DtFontSP
Definition: DtFontManager.h:20
A pen object with parameters on how to draw text.
Definition: DtBoundingBox.h:80
virtual ~DtTextLayoutInterface()
DTOR.
Definition: DtTextLayoutInterface.h:31
Contains makVrv::DtFont class.
A simple bounding box.
Definition: DtBoundingBox.h:101

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)