We need to draw the background over the rotated rectangle otherwise we
don't fill the whole background.
Regression from https://github.com/slint-ui/slint/pull/7685
(also cleanup a useless blend that was leftover from the same change)
Adapt the screenshot test to have at least one non-square "window" so
that we catch the problem in the future
This is a hacky approach, but does help a lot with the tedious fixes.
See https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_map_or
```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::unnecessary_map_or
cargo fmt --all
```
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
For tiling, we will need to know the actual source size in addition to
the scaling factor that can be different. So store the scaling factors
in the scene command, as well as an offset where to start.
This is more accurate in case of clipping and rotation.
For rotation that doesn't matter (appart from the fact that the testing
can now be more strict)
But for clipping this prevent glitches with partial rendering where it
would seem like the image are moving a bit by a pixel when it is redrawn
with a different clip
The test will test that things are rendered the same with a clip. But
that gives bad error when rendering images with high ferquencies because
a small difference in the initial condition of drawing may result in
being off by a pixel.
As discussed a few days ago, let's define rotation to be always
clockwise, as it is done in other graphics frameworks as well as our
own image rotation. This means changing the definition for the
software renderer. Also fixed docs for the enum in the linuxkms backend
that was wrong.
TODO:
- Polish the API
- Most screenshot test are failling because the rotation don't draw the
rounded rectangle exactly the same (that's because the border
rectangle algo is not perfect), and also scaled image are not pixel
perfect
The updated screenshot is because of a small change in the image
rendering algorithm that changes the rounding slightly.
Implement the partial rendering with winit and our software renderer.
When the background is not opaque, we must still initialize all the
pixel with 0 otherwise we blend over the previous frame.
(That wasn't visible before because the buffer was always empty)
We ended rendering glyphs with empty or even negative size, causing
panics down the line.
I added a way in the screenshot tester to change the scale factor
CC: #2957
Having a const generic for that didn't turn to be a good API.
Also made the C++ side more difficult
(Also renamed buffer_stride to pixel_stride)
Closes#2135
Allow for a small differences as "roundeing error" while drawing gradients.
Note that when stops are involved, we still get artifacts and bigger difference
than tollerable when clipping