# HG changeset patch # User Thinker K.F. Li # Date 1218586866 -28800 # Node ID a6150b4e066730d5534df1b04dd3949d1e8541ea # Parent 01854601279803595194884c454f4a9150118885 Fix bug of newing linear & radial paints diff -r 018546012798 -r a6150b4e0667 tools/mb_c_header.m4 --- a/tools/mb_c_header.m4 Wed Aug 13 08:08:52 2008 +0800 +++ b/tools/mb_c_header.m4 Wed Aug 13 08:21:06 2008 +0800 @@ -40,7 +40,7 @@ $2[]dnl [}; -extern $1_t *$1_new(redraw_mant_t *rdman); +extern $1_t *$1_new(redraw_man_t *rdman); extern void $1_free($1_t *obj); #endif /* __$1_H_ */] diff -r 018546012798 -r a6150b4e0667 tools/mb_c_source.m4 --- a/tools/mb_c_source.m4 Wed Aug 13 08:08:52 2008 +0800 +++ b/tools/mb_c_source.m4 Wed Aug 13 08:21:06 2008 +0800 @@ -43,7 +43,7 @@ divert[]]) define([S_ADD_LINEAR_PAINT],[ - obj->$1 = mb_linear_new(rdman, $2, $3, $4, $5); + obj->$1 = paint_linear_new(rdman, $2, $3, $4, $5); ifelse(COUNT($6),0,,[dnl stops = (grad_stop_t *)malloc(sizeof(grad_stop_t) * n_$1_stops); memcpy(stops, $1_stops, sizeof(grad_stop_t) * n_$1_stops); @@ -52,7 +52,7 @@ ]) define([S_ADD_RADIAL_PAINT],[ - obj->$1 = mb_radial_new(rdman, $2, $3, $4); + obj->$1 = paint_radial_new(rdman, $2, $3, $4); ifelse(COUNT($5),0,,[ stops = (grad_stop_t *)malloc(sizeof(grad_stop_t) * n_$1_stops); memcpy(stops, $1_stops, sizeof(grad_stop_t) * n_$1_stops); @@ -135,11 +135,11 @@ ]]); define([F_FILL_SHAPE],[[ - obj->$1->free(obj->$1); + obj->$1_fill->free(obj->$1_fill); ]]) define([F_STROKE_SHAPE],[[ - obj->$1->free(obj->$1); + obj->$1_stroke->free(obj->$1_stroke); ]]) define([CLEAR_VARS],[divert([-1]) @@ -159,13 +159,15 @@ define([MADBUTTERFLY],[dnl [#include +#include +#include #include "mb_types.h" #include "redraw_man.h" #include "shapes.h" #include "paint.h" #include "$1.h" -$1_t *$1_new(redraw_mant_t *rdman) { +$1_t *$1_new(redraw_man_t *rdman) { $1_t *obj; grad_stop_t *stops = NULL;]DECLARE_VARS $2[]dnl