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>2015-04-08 02:45:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-04-08 02:55:01 +0300
commita57b898d1760ade693983d1fd080399ab5e3367f (patch)
treeb388152f5a114c1612ef57d9c5f8398dd763271f /source/blender/blenfont
parent7e52d810f3a1b6ba8732eb7ccab11ecf9cfbb09f (diff)
BLF: Fix clamping drawing into byte buffer
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 087c7c7345e..1391e18748c 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -375,8 +375,8 @@ void blf_font_buffer(FontBLF *font, const char *str)
if (buf_info->cbuf) {
int yb = yb_start;
- for (y = 0; y < height_clip; y++) {
- for (x = 0; x < width_clip; x++) {
+ for (y = ((chy >= 0) ? 0 : -chy); y < height_clip; y++) {
+ for (x = ((chx >= 0) ? 0 : -chx); x < width_clip; x++) {
a = *(g->bitmap + x + (yb * g->pitch)) / 255.0f;
if (a > 0.0f) {