/usr/include/MYGUI/MyGUI_TextViewData.h is in libmygui-dev 3.2.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | /*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef __MYGUI_TEXT_VIEW_DATA_H__
#define __MYGUI_TEXT_VIEW_DATA_H__
#include "MyGUI_Prerequest.h"
namespace MyGUI
{
class CharInfo
{
public:
CharInfo() :
mIsColour(false)
{
mMetrics.mWidth = 0.0f;
mMetrics.mHeight = 0.0f;
mMetrics.mAdvance = 0.0f;
mMetrics.mBearingX = 0.0f;
mMetrics.mBearingY = 0.0f;
}
CharInfo(
const FloatRect& _rect,
float _width,
float _height,
float _advance,
float _bearingX,
float _bearingY) :
mIsColour(false),
mUVRect(_rect)
{
mMetrics.mWidth = _width;
mMetrics.mHeight = _height;
mMetrics.mAdvance = _advance;
mMetrics.mBearingX = _bearingX;
mMetrics.mBearingY = _bearingY;
}
CharInfo(uint32 _colour) :
mIsColour(true),
mColour(_colour)
{ }
bool isColour() const
{
return mIsColour;
}
float getWidth() const
{
return mMetrics.mWidth;
}
float getHeight() const
{
return mMetrics.mHeight;
}
float getAdvance() const
{
return mMetrics.mAdvance;
}
float getBearingX() const
{
return mMetrics.mBearingX;
}
float getBearingY() const
{
return mMetrics.mBearingY;
}
const FloatRect& getUVRect() const
{
return mUVRect;
}
uint32 getColour() const
{
return mColour;
}
private:
bool mIsColour;
FloatRect mUVRect;
struct Metrics
{
float mWidth;
float mHeight;
float mAdvance;
float mBearingX;
float mBearingY;
};
union
{
Metrics mMetrics;
uint32 mColour;
};
};
typedef std::vector<CharInfo> VectorCharInfo;
struct LineInfo
{
LineInfo() :
width(0),
offset(0),
count(0)
{
}
void clear()
{
width = 0;
count = 0;
simbols.clear();
offset = 0;
}
int width;
int offset;
size_t count;
VectorCharInfo simbols;
};
typedef std::vector<LineInfo> VectorLineInfo;
} // namespace MyGUI
#endif // __MYGUI_TEXT_VIEW_DATA_H__
|