[cairo] difference draw when there is a gradient

calmar mac at calmar.ws
Sat Apr 12 19:03:57 PDT 2008


Hi all,

I installed the git versions of cairo and pixman 
with --prefix /usr . I think that should enable them on gentoo?

So, on the awesome-wm, where I do some things to the widgets, I
have the following Problem:

http://www.calmar.ws/tmp/1_cairo.png

With a real gradient that it draws the graph-lines 1 pixel too much on
the right - therefore the gap and overpainted right border of the
rectangle-box.

http://www.calmar.ws/tmp/2_cairo.png

Here I define only one stop in the gradient, and it draws it
nicely into the box.

(The changed code, is also visible on the screenshots).

The question is, any idea why this could be the case?

Also there where it draws to much on the right (for one pixel),
first it seems to draw it correctly, but after some time it shifts.

Just in case, this is the whole file:
http://git.naquadah.org/?p=calmar/awesome.git;a=blob;f=common/draw.c;h=89037f9925dccf5ddd6335d79681257c6aa63a99;hb=e72d648ebf052506c98349e0f9af9aad605df1f2

it's about the draw_graph(...) function, what calls that
draw_setup_cairo_color_source(...) (visible on the screenshot)

I create the pattern (coordinates) like from point 1 to point
2, while the graph values gets (should) drawed inside the box (see
ascii-box below)

2---------
|..i.ii..|
1---------

Maybe that's wrong in some way?

Thank you very much for any hint.

marco

-- 
   (o_  It rocks: LINUX + Command-Line-Interface
   //\
   V_/_                     http://www.calmar.ws


More information about the cairo mailing list