Mercurial > MadButterfly
view examples/dynamic/mbapp.c @ 269:c96f38ad4bb6
Fix mis-behavior of translate_path_data() on arc.
- Arc in a path in svg2code_ex is not showed.
- translate_path_data() in svg2code.py was modified for calling
binary version new method for path shape.
- rdman_shape_path_new_from_binary()
- Code to translate path data does not handle arc in a right way.
- Copy calc_center_and_x_aix() from shape_path.c to svg2code.py and
change name _calc_ellipse_of_arc()
- _calc_ellipse_of_arc() handle arc data for translate_path_data()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 25 Jan 2009 00:20:34 +0800 |
parents | ab8284c8dcee |
children | 248a40d51473 |
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->rootsprite= sprite_load(module,app->rdman, app->rdman->root_coord); rdman_attach_backend(app->rdman, rt); 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); }