[Bf-blender-cvs] [ddcb238] temp-text_editor_cursor_api: made the y coordinate start at bottom left of the region
Martin Felke
noreply at git.blender.org
Tue Dec 30 11:58:12 CET 2014
Commit: ddcb2386c1889333db392ee62f9672d541be39b7
Author: Martin Felke
Date: Tue Dec 30 11:55:05 2014 +0100
Branches: temp-text_editor_cursor_api
https://developer.blender.org/rBddcb2386c1889333db392ee62f9672d541be39b7
made the y coordinate start at bottom left of the region
===================================================================
M source/blender/editors/space_text/text_draw.c
===================================================================
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 4c5894e..074c569 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1574,6 +1574,7 @@ bool ED_text_region_location_from_cursor(SpaceText *st, ARegion* ar, const int c
r_pixel_co[0] = (cursor_co[1] + offc - st->left) * st->cwidth;
r_pixel_co[1] = (cursor_co[0] + offl - st->top) * (st->lheight_dpi + TXT_LINE_SPACING);
+ r_pixel_co[1] = ar->winy - r_pixel_co[1];
}
return true;
More information about the Bf-blender-cvs
mailing list