[common/draw] no slightly diagonal gradient anymore (again)

that 'fix' didn't work out anyway properly.
Following patches should do a better job.
This commit is contained in:
marco candrian 2008-04-13 03:54:09 +02:00 committed by Marco Candrian
parent fe07cd4f30
commit 8277693ab4

View file

@ -307,9 +307,7 @@ draw_setup_cairo_color_source(DrawCtx *ctx, area_t rect,
cairo_set_source_rgb(ctx->cr, pcolor->red / 65535.0, pcolor->green / 65535.0, pcolor->blue / 65535.0); cairo_set_source_rgb(ctx->cr, pcolor->red / 65535.0, pcolor->green / 65535.0, pcolor->blue / 65535.0);
else else
{ {
/* rext.x + 1 -> else will draw 1 pixel too much to the right or pat = cairo_pattern_create_linear(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height);
* similar - cairo bug? */
pat = cairo_pattern_create_linear(rect.x - 1, rect.y, rect.x + 1 + rect.width, rect.y + rect.height);
/* pcolor is always set (so far in awesome) */ /* pcolor is always set (so far in awesome) */
cairo_pattern_add_color_stop_rgb(pat, 0.0, pcolor->red / 65535.0, cairo_pattern_add_color_stop_rgb(pat, 0.0, pcolor->red / 65535.0,