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

FemtoVG Renderer rendering does not match preview #7620

Open
Promedio opened this issue Feb 12, 2025 · 1 comment
Open

FemtoVG Renderer rendering does not match preview #7620

Promedio opened this issue Feb 12, 2025 · 1 comment
Labels
a:renderer-femtovg Femtovg renderer (mS) bug Something isn't working need triaging Issue that the owner of the area still need to triage

Comments

@Promedio
Copy link

Promedio commented Feb 12, 2025

Bug Description

The default renderer on Windows does not render consistently with the preview in certain cases, such as dorp-shadow of Rectangle, and @linear-gradient with transparent color.

dorp-shadow

Enabling dorp-shadow for Rectangle invariably fails to render the length of drop-shadow-blur correctly, instead it looks like only 5px.

Please see the following code (preview is left):

Rectangle {
	x: root.width * 20%;
	y: root.height * 20%;
	height: 60%;
	width: self.height;
	background: root.background.darker(5%);
	border-radius: 9px;
	drop-shadow-color: darkgray;
	drop-shadow-blur: 2rem;
}

Image

@linear-gradient

This situation is somewhat unique.

Please see the following code (preview is left):

Image {
	source: @image-url("../img/logo.svg");
	height: 110%;
	x: - self.width * 35%;
	y: parent.height * 70% - self.height * 50%;
	rotation-angle: 12deg;
	colorize: @linear-gradient(
		90deg - self.rotation-angle,
		transparent.mix(black, 96%) 35%,
		transparent 120%
	);
}

Image

Where transparent 120% doesn't render any gradient in the default renderer (Slightly right color of logo does not become transparent), but the color mixed by transparent.mix(black, 96%) 35% is normal (Leftmost color of logo).

——These are normal in the Skia renderer.

Environment Details

  • Slint Version: 1.9.2
  • Platform/OS: Windows 11 22631.4602
  • Programming Language: Rust
  • Backend/Renderer: Windows default
@Promedio Promedio added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Feb 12, 2025
@hunger hunger added the a:renderer-femtovg Femtovg renderer (mS) label Feb 13, 2025
@Promedio
Copy link
Author

Add note about the second problem (@linear-gradient).
It is not the use of transparent that prevents the gradient from being applied, but rather the use of a parameter like 35%; after removing this parameter, the problem disappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:renderer-femtovg Femtovg renderer (mS) bug Something isn't working need triaging Issue that the owner of the area still need to triage
Projects
None yet
Development

No branches or pull requests

2 participants