CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
TrVisFont.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23// GLES2 font
24
25#ifndef ODTRVISFONT
26#define ODTRVISFONT
27
28#include "TD_PackPush.h"
29#include "TrVisTexture.h"
31
32class OdTrVisFont : public OdRxObject
33{
34protected:
36 void setup(const OdChar* fontName, OdUInt32 fontSize, OdUInt32 fontWeight, OdUInt8 flags = 0, OdTrVisRendition* pRendition = NULL);
37public:
38
39 struct UVRect
40 {
41 double m_minX;
42 double m_minY;
43 double m_maxX;
44 double m_maxY;
45 void setZero()
46 {
47 m_minX = m_minY = m_maxX = m_maxY = 0.0;
48 }
49 };
51 {
52 kNone = 0,
53 kBold = 1,
54 kItalic = 1 << 1,
55 kUnderline = 1 << 2,
56 kStrikeout = 1 << 3
57 };
58
61
64 OdString fontName() const { return m_fontName; }
65 OdUInt32 fontSize() const { return m_fontSize; }
66 OdUInt32 fontWeight() const { return m_fontWeight; }
67 void getLetterSize( OdUInt32& w, OdUInt32& h ) const;
68
69protected:
75
77};
78
80
81#include "TD_PackPop.h"
82
83#endif // ODTRVISFONT
unsigned int OdUInt32
unsigned char OdUInt8
wchar_t OdChar
OdSmartPtr< OdTrVisFont > OdTrVisFontPtr
Definition: TrVisFont.h:79
void getLetterSize(OdUInt32 &w, OdUInt32 &h) const
OdUInt32 fontWeight() const
Definition: TrVisFont.h:66
OdTrVisTexturePtr getTextureForLetter(char c, UVRect &uvRect) const
static OdSmartPtr< OdTrVisFont > createFont(const OdChar *fontName, OdUInt32 fontSize, OdUInt32 fontWeight, OdUInt8 flags=0, OdTrVisRendition *pRendition=NULL)
OdTrVisRendition * m_pRendition
Definition: TrVisFont.h:74
OdTrVisTexturePtr getTexture() const
OdUInt32 fontSize() const
Definition: TrVisFont.h:65
void setup(const OdChar *fontName, OdUInt32 fontSize, OdUInt32 fontWeight, OdUInt8 flags=0, OdTrVisRendition *pRendition=NULL)
OdUInt32 m_fontSize
Definition: TrVisFont.h:71
OdTrVisTexturePtr m_pTexture
Definition: TrVisFont.h:76
OdString m_fontName
Definition: TrVisFont.h:70
OdUInt32 m_fontWeight
Definition: TrVisFont.h:72
OdString fontName() const
Definition: TrVisFont.h:64
OdUInt8 m_flags
Definition: TrVisFont.h:73
GLfloat GLfloat GLfloat GLfloat w
Definition: gles2_ext.h:320