Bug 4431 - KCanvas opacity improvements
Summary: KCanvas opacity improvements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Enhancement
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-14 15:30 PDT by Tobias Lidskog
Modified: 2005-08-16 01:55 PDT (History)
0 users

See Also:


Attachments
make opacity a float (5.95 KB, patch)
2005-08-14 15:32 PDT, Tobias Lidskog
eric: review+
Details | Formatted Diff | Diff
forgot a few changes (8.77 KB, patch)
2005-08-15 11:45 PDT, Tobias Lidskog
eric: review+
Details | Formatted Diff | Diff
update tests (10.87 KB, patch)
2005-08-15 15:03 PDT, Tobias Lidskog
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.