Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas opacity compositing #71

Open
paraboul opened this issue Apr 17, 2017 · 0 comments
Open

Canvas opacity compositing #71

paraboul opened this issue Apr 17, 2017 · 0 comments
Assignees
Labels

Comments

@paraboul
Copy link
Member

paraboul commented Apr 17, 2017

Currently, if we set a canvas opacity, the value is propagated to all the children.
The opacity should apply the composition, not to each child node.

Test case :

            var mchild3 = Elements.Create("flexcanvas", {
                height: 150,
                width: 200,
            });

            mchild3.color = "Moccasin";
            mchild3.position = "relative";
            mchild3.left = 60;
            mchild3.top = 80;
            mchild3.opacity = 0.7;
            
            document.canvas.add(mchild3);

            var mchild4 = Elements.Create("flexcanvas", {
                height: 40,
                width: 40,
            });

            mchild4.color = "Crimson";
            mchild4.position = "relative";
            mchild4.left = -10;
            mchild4.top = -10;

            mchild3.add(mchild4);

In this example, we should not be able to see through the second canvas on the first one. (The composition of mchild3 and mchild4 should be "atomic")

@paraboul paraboul added the bug label Apr 17, 2017
@paraboul paraboul self-assigned this Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant