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

[FT] - BlCompositeEffect missing Alexendrie drawing method #253

Closed
Nyan11 opened this issue May 16, 2023 · 3 comments
Closed

[FT] - BlCompositeEffect missing Alexendrie drawing method #253

Nyan11 opened this issue May 16, 2023 · 3 comments

Comments

@Nyan11
Copy link
Contributor

Nyan11 commented May 16, 2023

Hello,

Description

BlCompositeEffect is missing aeDrawAbove: aBlElement on: anAeCanvas and aeDrawBelow: aBlElement on: anAeCanvas methods

severity: very low (but i already di it)

Reproduction

element := BlElement new background: Color gray; yourself.

shadow1 := BlGaussianShadowEffect color: Color red width: 20 offset: 10 @ 20.
shadow2 := BlGaussianShadowEffect color: Color green width: 20 offset: -10 @ 20.
shadow3 := BlGaussianShadowEffect color: Color blue width: 20 offset: 20 @ -10.
composite := BlCompositeEffect effects: { shadow1 . shadow2 . shadow3 }.

element effect: composite
element openInNewSpace.

current result:

image

expected result:

image

Possible fix

Implement both methods (i did it, i prepare the pull request).

@tinchodias
Copy link
Collaborator

Nice example!
We should add a render test, in BARenderTest + a PNG (in fact, the example must be added in BlSpaceFixture).
AFAIU, I am the only one that added tests there and think it's not trivial without a good guide... I can take care of adding this test unless you want to do it and I can explain how to.
(I add it to my to-do for the moment)

@tinchodias
Copy link
Collaborator

Nice, it works.

Screenshot 2023-05-23 at 10 53 52

Only added position:

element := BlElement new
	background: Color gray;
	position: 100 @ 100;
	yourself.

shadow1 := BlGaussianShadowEffect color: Color red width: 20 offset: 10 @ 20.
shadow2 := BlGaussianShadowEffect color: Color green width: 20 offset: -10 @ 20.
shadow3 := BlGaussianShadowEffect color: Color blue width: 20 offset: 20 @ -10.
composite := BlCompositeEffect effects: { shadow1 . shadow2 . shadow3 }.

element effect: composite.
element openInNewSpace.

So, we close the issue.

@tinchodias
Copy link
Collaborator

Hi @Nyan11 I adapted your example as a test in: 39cb92e

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants