bug fixed
This commit is contained in:
parent
ead3e52cef
commit
48ae177f1d
|
|
@ -100,11 +100,18 @@ UINT32 e2d::Text::getColor() const
|
|||
}
|
||||
|
||||
int e2d::Text::getLineCount() const
|
||||
{
|
||||
if (m_pDWriteTextLayout)
|
||||
{
|
||||
DWRITE_TEXT_METRICS metrics;
|
||||
m_pDWriteTextLayout->GetMetrics(&metrics);
|
||||
return static_cast<int>(metrics.lineCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool e2d::Text::isItalic() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ public:
|
|||
template<typename T>
|
||||
static inline T range(T min, T max) { return e2d::Random::randomInt(min, max); }
|
||||
|
||||
// 取得浮点数范围内的一个随机数
|
||||
static inline double range(float min, float max) { return e2d::Random::randomReal(min, max); }
|
||||
|
||||
// 取得浮点数范围内的一个随机数
|
||||
static inline double range(double min, double max) { return e2d::Random::randomReal(min, max); }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue