Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/bmfont/BMF_Api.h')
-rw-r--r--intern/bmfont/BMF_Api.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/intern/bmfont/BMF_Api.h b/intern/bmfont/BMF_Api.h
index 5900ea85ec7..1b4a4ee3129 100644
--- a/intern/bmfont/BMF_Api.h
+++ b/intern/bmfont/BMF_Api.h
@@ -110,6 +110,11 @@ void BMF_GetStringBoundingBox(BMF_Font* font, char* str, float*llx, float *lly,
void BMF_GetFontBoundingBox(BMF_Font* font, int *xmin_r, int *ymin_r, int *xmax_r, int *ymax_r);
/**
+ * Same as GetFontBoundingBox but only returns the height
+ */
+int BMF_GetFontHeight(BMF_Font* font);
+
+/**
* Convert the given @a font to a texture, and return the GL texture
* ID of the texture. If the texture ID is bound, text can
* be drawn using the texture by calling DrawStringTexture.
@@ -134,6 +139,23 @@ int BMF_GetFontTexture(BMF_Font* font);
*/
void BMF_DrawStringTexture(BMF_Font* font, char* string, float x, float y, float z);
+ /**
+ * Draw the given @a string at the point @a xpos, @a ypos using
+ * char and float buffers.
+ *
+ * @param string The c-string to draw.
+ * @param xpos The x coordinate to start drawing at.
+ * @param ypos The y coordinate to start drawing at.
+ * @param fgcol The forground color.
+ * @param bgcol The background color.
+ * @param buf Unsigned char image buffer, when NULL to not operate on it.
+ * @param fbuf float image buffer, when NULL to not operate on it.
+ * @param w image buffer width.
+ * @param h image buffer height.
+ */
+void BMF_DrawStringBuf(BMF_Font* font, char *str, int posx, int posy, float *col, unsigned char *buf, float *fbuf, int w, int h);
+
+
#ifdef __cplusplus
}
#endif