Bug 4431

Summary: KCanvas opacity improvements
Product: WebKit Reporter: Tobias Lidskog <tobiaslidskog>
Component: SVGAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED FIXED    
Severity: Enhancement    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
make opacity a float
eric: review+
forgot a few changes
eric: review+
update tests eric: review+

Description Tobias Lidskog 2005-08-14 15:30:59 PDT
Opacity is represented as a number between 0 and 1 everywhere i SVG, kvsg2 and kcanvas, except in 
KRenderingStyle and KCanvasRenderingStyle where it's 0 - 255. The inconsistency in the API is confusing, 
and also results in lots of extra floating point divisions (opacity = opacity/255.0) that are bad for 
performance.
Comment 1 Tobias Lidskog 2005-08-14 15:32:36 PDT
Created attachment 3385 [details]
make opacity a float

Changes to make opacity handling consistent in all of ksvg and kcanvas
Comment 2 Eric Seidel (no email) 2005-08-15 03:23:25 PDT
Comment on attachment 3385 [details]
make opacity a float

Looks fine to me.
Comment 3 Tobias Lidskog 2005-08-15 11:45:36 PDT
Created attachment 3408 [details]
forgot a few changes

the original file lacked a few diffs, this should be complete
Comment 4 Eric Seidel (no email) 2005-08-15 13:09:19 PDT
Comment on attachment 3408 [details]
forgot a few changes

Assuming this is all of them, and svg still passes all the layout tets, yes
this looks fine.
Comment 5 Tobias Lidskog 2005-08-15 15:03:02 PDT
Created attachment 3412 [details]
update tests

truly sorry, forgot to attach the tests results that change
opacity 127 -> 0.5 and 255 -> 1.0
Comment 6 Eric Seidel (no email) 2005-08-15 23:36:44 PDT
Comment on attachment 3412 [details]
update tests

looks good.