[graph] fix: use own vertical_gradient config for each data{}

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
marco candrian 2008-04-18 01:30:12 +02:00 committed by Julien Danjou
parent 2eb6fda36e
commit cbef649a2d
1 changed files with 44 additions and 48 deletions

View File

@ -127,10 +127,12 @@ graph_draw(Widget *widget, DrawCtx *ctx, int offset,
if(d->filltop_total)
{
/* all these filltop's have the same setting */
pattern_area.y = rectangle.y - rectangle.height;
if(d->filltop_vertical_grad[0])
/* draw style = top */
for(z = 0; z < d->filltop_total; z++)
{
if(d->filltop_vertical_grad[z])
{
pattern_area.width = 0;
pattern_area.height = rectangle.height;
@ -145,9 +147,6 @@ graph_draw(Widget *widget, DrawCtx *ctx, int offset,
pattern_area.width = rectangle.width;
}
/* draw style = top */
for(z = 0; z < d->filltop_total; z++)
{
cur_index = *(d->filltop_index[z]);
for(y = 0; y < d->size; y++)
@ -193,8 +192,10 @@ graph_draw(Widget *widget, DrawCtx *ctx, int offset,
if(d->fillbottom_total)
{
/* all these fillbottom's have the same setting */
if(d->fillbottom_vertical_grad[0])
/* draw style = bottom */
for(z = 0; z < d->fillbottom_total; z++)
{
if(d->fillbottom_vertical_grad[z])
{
pattern_area.width = 0;
pattern_area.height = -rectangle.height;
@ -209,9 +210,6 @@ graph_draw(Widget *widget, DrawCtx *ctx, int offset,
pattern_area.width = rectangle.width;
}
/* draw style = bottom */
for(z = 0; z < d->fillbottom_total; z++)
{
cur_index = *(d->fillbottom_index[z]);
for(y = 0; y < d->size; y++)
@ -242,8 +240,10 @@ graph_draw(Widget *widget, DrawCtx *ctx, int offset,
if(d->drawline_total)
{
/* all these drawline's have the same setting */
if(d->drawline_vertical_grad[0])
/* draw style = line */
for(z = 0; z < d->drawline_total; z++)
{
if(d->drawline_vertical_grad[z])
{
pattern_area.width = 0;
pattern_area.height = -rectangle.height;
@ -251,16 +251,12 @@ graph_draw(Widget *widget, DrawCtx *ctx, int offset,
else
{
pattern_area.height = 0;
if(d->grow == Right)
pattern_area.width = -rectangle.width;
else
pattern_area.width = rectangle.width;
}
/* draw style = line */
for(z = 0; z < d->drawline_total; z++)
{
draw_graph_line(ctx, rectangle, d->drawline[z], *(d->drawline_index[z]), d->grow, pattern_area,
&(d->drawline_color[z]), d->drawline_pcolor_center[z], d->drawline_pcolor_end[z]);
}