diff options
author | Jason Sams <rjsams@android.com> | 2009-07-28 17:20:11 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-07-28 17:20:11 -0700 |
commit | 6f5c61c8df70273e3bbc7fd07412cc69b6ce1e76 (patch) | |
tree | b429479c913cfdd0f91a7386d99295e10638ce56 /libs/rs/rsScriptC_Lib.cpp | |
parent | 37d7fc70dd92a29662b9e170f91ee6b35ae950ab (diff) | |
download | frameworks_base-6f5c61c8df70273e3bbc7fd07412cc69b6ce1e76.zip frameworks_base-6f5c61c8df70273e3bbc7fd07412cc69b6ce1e76.tar.gz frameworks_base-6f5c61c8df70273e3bbc7fd07412cc69b6ce1e76.tar.bz2 |
Add new icons and implement text. Fix bug with uploading 8888 bitmaps of non-square size.
Diffstat (limited to 'libs/rs/rsScriptC_Lib.cpp')
-rw-r--r-- | libs/rs/rsScriptC_Lib.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp index 10d1120..4121906 100644 --- a/libs/rs/rsScriptC_Lib.cpp +++ b/libs/rs/rsScriptC_Lib.cpp @@ -356,6 +356,15 @@ static void SC_drawQuad(float x1, float y1, float z1, glDrawArrays(GL_TRIANGLE_FAN, 0, 4); } +static void SC_drawRect(float x1, float y1, + float x2, float y2, float z) +{ + SC_drawQuad(x1, y2, z, + x2, y2, z, + x2, y1, z, + x1, y1, z); +} + ////////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////////////// @@ -442,7 +451,7 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = { "float", "(float)" }, { "cosf", (void *)&cosf, "float", "(float)" }, - { "fabs", (void *)&fabs, + { "fabsf", (void *)&fabsf, "float", "(float)" }, { "randf", (void *)&SC_randf, "float", "(float)" }, @@ -496,6 +505,8 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = { // drawing + { "drawRect", (void *)&SC_drawRect, + "void", "(float x1, float y1, float x2, float y2, float z)" }, { "drawQuad", (void *)&SC_drawQuad, "void", "(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4)" }, { "drawTriangleArray", (void *)&SC_drawTriangleArray, |