diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-07-02 15:27:08 +0300 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-07-02 15:27:08 +0300 |
commit | 04838e411be0c7996fcddff5cccecb0df20db63f (patch) | |
tree | 7dcf7485bef071c0755f8d16f7f104fb0c2f8338 /indra/llrender/llfontgl.cpp | |
parent | 0cf9168895b1d7b69e4a0307ade6cbc607f799f2 (diff) | |
parent | 3b9c7d3403b7b5aa7f1709cf5498bbe583f2e309 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/llrender/llfontgl.cpp')
-rw-r--r-- | indra/llrender/llfontgl.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index d9e1976341..6eb5e0eff4 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -118,6 +118,32 @@ BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dp static LLFastTimer::DeclareTimer FTM_RENDER_FONTS("Fonts"); +S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, + ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const +{ + F32 x = rect.mLeft; + F32 y = 0.f; + + switch(valign) + { + case TOP: + y = rect.mTop; + break; + case VCENTER: + y = rect.getCenterY(); + break; + case BASELINE: + case BOTTOM: + y = rect.mBottom; + break; + default: + y = rect.mBottom; + break; + } + return render(wstr, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, rect.getWidth(), right_x, use_ellipses); +} + + S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const { |