Mercurial > MadButterfly
view src/mbaf/mbapp.c @ 446:2437047b8bb8
Fix bug of propertional shifting of sh_stext_t.
Original
- sh_stext_t does not apply shifting of text himself to scaled font face, but
- apply aggreagated matrix to font face.
- shifting in parent parent coord_t would applied to scaled font.
- amount of shifting is also multiplied by aggreagated matrix.
- It means shiftings of parent coord_ts are applied two times.
Now,
- remove x, y shifting from aggreagated matrices before applying
to scaled fonts.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 02 Aug 2009 10:59:59 +0800 |
parents | 2e97e8082d83 |
children | 84ce2d4a8c3f |
line wrap: on
line source
#include <mb.h> #include <mbapp.h> MBApp *MBApp_Init(char *module) { MBApp *app = (MBApp *) malloc(sizeof(MBApp)); X_MB_runtime_t *rt; rt = X_MB_new(":0.0", 800, 600); app->rt = rt; app->rdman = X_MB_rdman(rt); app->kbevents = X_MB_kbevents(rt); app->rootsprite= sprite_load(module,app->rdman, app->rdman->root_coord); rdman_attach_backend(app->rdman, rt); MB_SPRITE_GOTO_SCENE(app->rootsprite, 1); return app; } void MBApp_setData(MBApp *app,void *data) { app->private = (void *) data; } mb_tman_t *MBApp_getTimer(MBApp *app) { return X_MB_tman(app->rt); } void MBApp_loop(MBApp *en) { /* * Start handle connections, includes one to X server. * User start to interact with the application. */ X_MB_handle_connection(en->rt); /* * Clean */ X_MB_free(en->rt); free(en); }