Mercurial > MadButterfly
diff tools/mb_c_source.m4 @ 78:3645e29e4986
Add runtime for Xlib.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 20 Aug 2008 23:33:04 +0800 |
parents | 9ab15ebc9061 |
children | e548221c04eb |
line wrap: on
line diff
--- a/tools/mb_c_source.m4 Wed Aug 20 00:32:11 2008 +0800 +++ b/tools/mb_c_source.m4 Wed Aug 20 23:33:04 2008 +0800 @@ -32,7 +32,8 @@ DIMPORT([ADD_LINEAR_PAINT]) DIMPORT([ADD_RADIAL_PAINT]) DIMPORT([COLOR_STOP]) -define([REF_STOPS]) +define([REF_STOPS_RADIAL]) +define([REF_STOPS_LINEAR]) define([ADD_PATH]) define([ADD_RECT]) define([ADD_COORD]) @@ -61,12 +62,19 @@ ]) define([S_COLOR_STOP],[]) -define([S_REF_STOPS],[dnl + +define([S_REF_STOPS_RADIAL],[dnl [ stops = (grad_stop_t *)malloc(sizeof(grad_stop_t) * n_$2_stops); memcpy(stops, $2_stops, sizeof(grad_stop_t) * n_$2_stops); paint_radial_stops(obj->$1, n_$2_stops, stops); ]]) +define([S_REF_STOPS_LINEAR],[dnl +[ stops = (grad_stop_t *)malloc(sizeof(grad_stop_t) * n_$2_stops); + memcpy(stops, $2_stops, sizeof(grad_stop_t) * n_$2_stops); + paint_linear_stops(obj->$1, n_$2_stops, stops); +]]) + define([S_ADD_RECT],[[ obj->$1 = sh_rect_new($2, $3, $4, $5, 0, 0); rdman_add_shape(rdman, obj->$1, obj->$6); @@ -104,7 +112,8 @@ SIMPORT([ADD_LINEAR_PAINT]) SIMPORT([ADD_RADIAL_PAINT]) SIMPORT([COLOR_STOP]) -SIMPORT([REF_STOPS]) +SIMPORT([REF_STOPS_RADIAL]) +SIMPORT([REF_STOPS_LINEAR]) SIMPORT([ADD_PATH],) SIMPORT([ADD_RECT]) SIMPORT([ADD_COORD]) @@ -147,7 +156,8 @@ FIMPORT([ADD_LINEAR_PAINT]) FIMPORT([ADD_RADIAL_PAINT]) define([COLOR_STOP]) -define([REF_STOPS]) +define([REF_STOPS_RADIAL]) +define([REF_STOPS_LINEAR]) FIMPORT([ADD_PATH],) FIMPORT([ADD_RECT]) define([ADD_COORD])