Mercurial > MadButterfly
comparison src/paint.c @ 757:f43224bf3524
Remove unused variables and refactor to X_MB_init_with_win
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Thu, 26 Aug 2010 17:54:11 +0800 |
parents | e813ac222f48 |
children | 586e50f82c1f |
comparison
equal
deleted
inserted
replaced
756:cceac4ba259e | 757:f43224bf3524 |
---|---|
81 #define LIF_DIRTY 0x1 | 81 #define LIF_DIRTY 0x1 |
82 | 82 |
83 static void paint_linear_prepare(paint_t *paint, mbe_t *cr) { | 83 static void paint_linear_prepare(paint_t *paint, mbe_t *cr) { |
84 paint_linear_t *linear = (paint_linear_t *)paint; | 84 paint_linear_t *linear = (paint_linear_t *)paint; |
85 mbe_pattern_t *ptn; | 85 mbe_pattern_t *ptn; |
86 grad_stop_t *stop; | |
87 int i; | |
88 | 86 |
89 ptn = linear->ptn; | 87 ptn = linear->ptn; |
90 if(linear->flags & LIF_DIRTY) { | 88 if(linear->flags & LIF_DIRTY) { |
91 if(ptn) | 89 if(ptn) |
92 mbe_pattern_destroy(ptn); | 90 mbe_pattern_destroy(ptn); |
171 #define RDF_DIRTY 0x1 | 169 #define RDF_DIRTY 0x1 |
172 | 170 |
173 static void paint_radial_prepare(paint_t *paint, mbe_t *cr) { | 171 static void paint_radial_prepare(paint_t *paint, mbe_t *cr) { |
174 paint_radial_t *radial = (paint_radial_t *)paint; | 172 paint_radial_t *radial = (paint_radial_t *)paint; |
175 mbe_pattern_t *ptn; | 173 mbe_pattern_t *ptn; |
176 int i; | |
177 | 174 |
178 if(radial->flags & RDF_DIRTY) { | 175 if(radial->flags & RDF_DIRTY) { |
179 ptn = mbe_pattern_create_radial(radial->cx, radial->cy, 0, | 176 ptn = mbe_pattern_create_radial(radial->cx, radial->cy, 0, |
180 radial->cx, radial->cy, | 177 radial->cx, radial->cy, |
181 radial->r, | 178 radial->r, |