[cairo] Gradient Transformation Problems

Hakki Dogusan dogusanh at tr.net
Wed Dec 12 00:59:29 PST 2007


Hi,

Me Myself wrote:
> 
> I am seeing some differences when filling paths with gradients. I start out with two rectangle paths, one inside the other. Each one has a linear gradient from the top-left to bottom-right, and vice-versa for the inner rectangle.
> 
> The problem I am seeing is that if I take these two shapes and scale them (by 0.25, 0.5 in my test) I see a different result than if I manually calculate the points to the correct scaled values, without using cairo_scale().
> 
> Does anyone have any idea why this is happening?
> 
> To show you what I mean, I've attached a screenshot of the two rectangle gradients. The one on top uses cairo_scale() to create the rectangle points, and the one on bottom uses manual calculations to produce the scaled points.
> 
> I used CairoPad (thanks Hakki!) to create this test. Here is the code for it:
> 

Thanks for using it! May I distrubute your code with CairoPad? If your 
answer is yes, please send me what to put to Info fields (I'll fill 
Notes field with your message and Carl's reply, with your permission).

> [snipped]


--
Regards,
Hakki Dogusan



More information about the cairo mailing list