I've basically completed writing Imlib2 bindings for Lua. I've been trying to get imlib_text_get_index_and_location to work, but it always seem to return -1 (failure) for me. It's looking more and more like an Imlib2 bug, but of course there's a fairly good probability I'm doing something stupid. Below is an example from my problem, which seems fairly bullet proof to me:
imlib_add_path_to_font_path("./resources"); Imlib_Font font = imlib_load_font("Vera/30"); if (font != NULL) printf("font is good\n"); imlib_context_set_font(font); const char *text = "foo"; int t_w, t_h; imlib_get_text_size(text, &t_w, &t_h); printf("width: %d height: %d\n", t_w, t_h); int c_x, c_y, c_w, c_h; int ret = imlib_text_get_index_and_location(text, 5, 5, &c_x, &c_y, &c_w, &c_h); if (ret == -1) printf("imlib_text_get_index_and_location returned -1\n"); I've performed tests looping through every x,y in the text size reported by imlib_get_text_size, and always get -1. A quick look at the source and it seems most likely that imlib_font_query_at is always returning -1, as I can't see why the switch statements on IMLIB_TEXT_TO_* would fall through. I've tested with 1.3.0 and 1.4.0. Any thoughts? Alex ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel