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

Effects #191

Closed
fool-in-the-rain opened this issue Nov 12, 2022 · 7 comments
Closed

Effects #191

fool-in-the-rain opened this issue Nov 12, 2022 · 7 comments

Comments

@fool-in-the-rain
Copy link

fool-in-the-rain commented Nov 12, 2022

Hi, our work is already deeply indebted to the effects which made presentations so lively in Pharo 7 with Skia. Could these effects, such as BlGaussianShadowEffect, and drop shadow, be revived for the current implementation of Cairo Alexandrie? The gaussian effect is huge.

If you could also consider some creative opportunities for the mesh gradient, that is another effect which would help rivet peoples' attention. Anything to help shine a light on the underlying technology is a big plus for us.

@tinchodias
Copy link
Collaborator

tinchodias commented Dec 20, 2022

Hi, we now have shadows. Since this commit. Feedback welcome!

Warning: we plan to improve performance with:

  • caching
  • taking advantage of each particular geometry

There is the Gaussian shadow:

		aBlElement effect:
			(BlGaussianShadowEffect
				color: Color orange
				width: 5
				offset: 0@0 )

From our regression tests:


And also the "simple" shadow, that is like the Gaussian with width=0, i.e. sharp edges. Example:

		aBlElement effect:
			(BlSimpleShadowEffect
				color: Color orange
				offset: 1 @ 1 ) 

@tinchodias
Copy link
Collaborator

imagen

@astares
Copy link

astares commented Dec 21, 2022

Cool!

@tinchodias
Copy link
Collaborator

There was a visual bug in some cases, that is fixed with my latest commit on Alexandrie.

(For the record: it took me some debug time to detect the bug happened when the pixel width of the Cairo surface was different than it's stride)

@tinchodias
Copy link
Collaborator

The mesh gradient is already implement in Athens-Cairo, so shouldn't be hard to port it to Alexandrie, and add a new Bloc paint.

I am taking a glance at COLR spec and they call it sweep gradient.

@tinchodias
Copy link
Collaborator

Correction: the sweep gradient is an application of the mesh gradient. Here is a cairo test that shows how to do it: https://gitlab.freedesktop.org/cairo/cairo/-/blob/master/test/mesh-pattern-conical.c

@tinchodias
Copy link
Collaborator

We keep open issue 333 for conical gradient and close this, which is too wide

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

3 participants