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

Implement box-shadow with Azure Blur #859

Closed
wants to merge 33 commits into from
Closed

Conversation

Afoucaul
Copy link

This PR is an attempt to solve #13.

I merged and updated what @liZe did back in 2013 in #149.
I also wrote the property rule to support box-shadow.

While I understand the points raised in #13 and #149, I strongly believe that it's better to have this implementation, improvable as it may be, rather than nothing.
Furthermore, @liZe did some awesome work, even though it's been deemed not so efficient.
Now that it's been integrated, we can consider improving the implementation, but at least, we can generate basic shadows.

Here's an example of how shadows are rendered:

<style>
div {
    width: 100px;
    height: 100px;
    background-color: green;
    box-shadow: 10px 10px 5px 5px black;
}
</style>
<div></div>

Screenshot from 2019-04-27 12-56-28

Not that bad looking IMO, and can be improved with a little CSS tweaking.

@Afoucaul
Copy link
Author

Afoucaul commented Apr 27, 2019

So... Based on @SimonSapin's suggestion in #13, and his work on providing Python bindings for AzureBlur, I implemented the box shadow drawing using cairo and azureblur. It looks pretty awesome, to be honest.

This is the new shadow, using the same code as above:

Screenshot from 2019-04-27 16-46-06

I still have to work on the inset shadows.
What do you guys think about it?

Edit: I cannot seem to get azureblur with pip, although it's on PyPI. Does it need to be updated there? Else there's no choice but to install it from the sources...

@Afoucaul Afoucaul changed the title Merge box-shadow implementation Implement box-shadow using Azure Blur Apr 27, 2019
@Afoucaul Afoucaul changed the title Implement box-shadow using Azure Blur Implement box-shadow with Azure Blur Apr 27, 2019
@liZe
Copy link
Member

liZe commented May 15, 2019

I'm closing this PR for now (see #13).

@liZe liZe closed this May 15, 2019
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

Successfully merging this pull request may close these issues.

2 participants