gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] cairo backend - question about gradients


From: Otávio Ribeiro
Subject: Re: [Gnash-dev] cairo backend - question about gradients
Date: Thu, 31 Aug 2006 00:53:38 -0300

sorry,

forget about it.

256 pixels x 20 = 5120 twips x 6.4 = 32768 twips

20x6.4 = 128!!!

thanks,
Otávio Ribeiro

Em Qua, 2006-08-30 às 21:36 -0300, Otávio Ribeiro escreveu:
Just a question about matrix adjustment when generating gradient images.

When generating gradients, gnash creates an image of 256x1 pixels for linear and 64x64 pixels for radial. Then the gradient matrix is adjusted to scale it to the gradient square (-16384,-16384) (16384,16384) as specified by macromedia flash format specification.

linear gradients are scaled by 128, and radial by 512. Look at /server/styles.cpp.

This numbers are calculated using the width of generated image right? The problem is that this width is in pixel and not in twips. So, the final image will have 32768 pixels and macromedia specifies 32768 twips witch is 20x bigger!

I'm trying to finish cairo backend and one of the problems is with matrix adjustment when applying a patern. The problem is that with normal images we have a slight difference (they are almost on the right size) but the gradients are rendered much more smaller then they should be.

That's because the SWF gradient matrix is generated using TWIPS proportions and not pixel.

I don't no how openGL guys have fixed it!

regards
Otávio Ribeiro
_______________________________________________
Gnash-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnash-dev

reply via email to

[Prev in Thread] Current Thread [Next in Thread]