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:
authorCampbell Barton <ideasman42@gmail.com>2007-10-20 20:17:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-10-20 20:17:27 +0400
commit46deddcc62784dab47b1f14dda0d802f5f341b18 (patch)
treee3542a1b2d10f1c77e4ac5f7078f485d5b4e1006 /intern/bmfont/BMF_Api.h
parente5a9e0b12a6d6aa334561edaf8a839f3f1a8d7d4 (diff)
Image Stamping patch by Diego (and peach request)- stamps image info into metadata and optionally
draws into the frame. This patch includes some changes I made... * use blenders bitmap fonts (rather then own fonts) * select font size * user interface layout changes * Marker as another image stamp option Also added some new API calls BMF_GetFontHeight(font); BMF_DrawStringBuf(...); - so we can draw text into an imbuf's image buffer. get_frame_marker(frame) - get the last marker from the frame. IMB_rectfill_area(...) - fill in an image buffer with a rectangle area of color. TODO - draw stamp info in 3d view, at the moment it just displays in the animation.
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