summaryrefslogtreecommitdiff
path: root/scriptc
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-10-05 11:33:27 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-10-05 11:33:27 -0700
commit09c67356bbeee0a97a20a06c95b66756838cb541 (patch)
tree7b51147cb9aee9ca5040c16db6255a1ea7cef4ac /scriptc
parentc9fa30536fb41f0166153561388b7c42f7cb85a0 (diff)
downloadrs-09c67356bbeee0a97a20a06c95b66756838cb541.tar.gz
Adding text metrics to renderscript.
Change-Id: Ica460525243d714a278e4ad5e436af43e1008e0c
Diffstat (limited to 'scriptc')
-rw-r--r--scriptc/rs_graphics.rsh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scriptc/rs_graphics.rsh b/scriptc/rs_graphics.rsh
index c0b2d2d1..ac6f8ccc 100644
--- a/scriptc/rs_graphics.rsh
+++ b/scriptc/rs_graphics.rsh
@@ -79,6 +79,12 @@ extern void __attribute__((overloadable))
rsgBindFont(rs_font);
extern void __attribute__((overloadable))
rsgFontColor(float, float, float, float);
+// Returns the bounding box of the text relative to (0, 0)
+// Any of left, right, top, bottom could be NULL
+extern void __attribute__((overloadable))
+ rsgMeasureText(const char *, int *left, int *right, int *top, int *bottom);
+extern void __attribute__((overloadable))
+ rsgMeasureText(rs_allocation, int *left, int *right, int *top, int *bottom);
extern void __attribute__((overloadable))
rsgMeshComputeBoundingBox(rs_mesh mesh, float *minX, float *minY, float *minZ,