Mercurial > MadButterfly
view dox/first_program.h @ 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 | 6ce68c1f7405 |
children |
line wrap: on
line source
/*! \page first_program Your First MadButterfly Program. * * MadButterfly use SVG as a media to adapt gap between GUI designers * and application programmmers. Designers export their works with SVG * format. Then some ones, designers or programmers, assign IDs to SVG tags * that will be manipulated by application. For example, you have a menu * that should be hidden at beginning. When user hit a button, the menu * should be showed. So, we assign an ID to the group or other tags that * contain all elements in menu. The ID is the name of a object that * application manipulate, hide and show it. * * After assigning IDs to tags, the file is translated by svg2code.py. * Outputs of svg2code.py are M4 macro files. Conventional, foo.svg is * translated a M4 file as foo.mb, using .mb as extension of file name. * Macro files are translate to *.c and *.h files to link with application * programs. * * For example, to translate foo.svg with steps * - \$(PREFIX)/bin/svg2code.py foo.svg foo.mb * - m4 -I \$(PREFIX)/share/mb mb_c_source.m4 foo.mb > foo.c * - m4 -I \$(PREFIX)/share/mb mb_c_header.m4 foo.mb > foo.h * * foo.h declares a structure, named 'foo' and two functions, * foo_new() and foo_free(). An instance of 'foo' holds all objects for * foo.svg. One object, with specified ID as name, for each tag. If you * don't assign one, a random one is picked. foo_new() is invoked to create * and initialize a 'foo' instance. An instance is released by calling * foo_free(). * * \dontinclude examples/svg2code_ex/main.c * \skip main * \until } */