From fb10c16a0528a418053e4b8e75eebe57476b86ef Mon Sep 17 00:00:00 2001 From: Alex Sakhartchouk Date: Wed, 4 Aug 2010 14:45:48 -0700 Subject: Added ability to set font color. Propagating the name of meshes and allocations from native a3d to java Change-Id: If781f55340b5369459610e5e92ea69e240dcd24e --- libs/rs/rsFont.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libs/rs/rsFont.cpp') diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp index d1346fc..e58d8b1 100644 --- a/libs/rs/rsFont.cpp +++ b/libs/rs/rsFont.cpp @@ -259,6 +259,7 @@ FontState::FontState() mCurrentQuadIndex = 0; mRSC = NULL; mLibrary = NULL; + setFontColor(0.0f, 0.0f, 0.0f, 1.0f); } FontState::~FontState() @@ -660,6 +661,14 @@ void FontState::renderText(Allocation *alloc, uint32_t start, int len, int x, in renderText(text, allocSize, start, len, x, y); } +void FontState::setFontColor(float r, float g, float b, float a) { + mFontColor[0] = r; + mFontColor[1] = g; + mFontColor[2] = b; + mFontColor[3] = a; + mFontColorDirty = true; +} + void FontState::deinit(Context *rsc) { mInitialized = false; -- cgit v1.1