That code was touched recently while doing the signed distance field
rendering. The offset is now within the source rectangle.
So the SharedBufferCommand's source_rect must include the whole pixmap.
Unfortunately, VectorFont are not covered by the screenshot tests
Instead of using the trick of taking a sub-slice and pretending the
image was smaller than it is.
Then this is more uniform with all the other rendering path.
And this should prevent the panic in #6643Fixes#6643
- include the ' ' char that doesn't have a bounding box but need to be
included for the advance_x
- Fix an off by one in rendering where the last pixel was missing
Everything is already working, just had to play around with a few cfgs. The sharedfontdb module already takes care of including DejaVuSans as default fallback font.
Instead, just ignore the rotation.
(Rotation is currently used in the live-preview to show the collapsed
items. It shouldn't cause a panic even if rotation is not showning)
CC: #3068
The struct held provides access to the design metrics of the font scaled
to the font pixel size used by the element.
ChangeLog: Slint Language: Added font-metrics property to `Text` and `TextInput`.
Closes#6047
We were assuming that the extra clip was always on a unrotated image,
the rendering code didn't account for rotated screens
ChangeLog: Software renderer: fix artifact with partial drawing and rotation
This adds a new wrapping mode called `char-wrap`, which allows for wrapping at any character.
Currently, it only supports the Qt backend, with the other backends falling back to `word-wrap` when this option is selected.
Add a placeholder Rectangle into a layout whenever the last eleemnt is removed.
This makes sure we can drop into the Layout again.
Add infrastructure to find the parent element to ElementRcNode and move more
code into the ElementRcNode.
Can be preproduced on the esp-idf usecases p4 demo when going into the
combobox dans doing a long press in the popup.
Same fix as 4296ca2afe but for line by
line
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"
We call fit_to with the source size (which is not scaled by the scale
factor) while the actual image is already scaled, so we need to adjust
for the difference between the texture size and the original size.
Also pass the scale_factor at compile time to the screenshot test
Only the hand-picked sensible things, not all of it ;-)
Also fix a few typos that cspell complained about when I
tried to commit and some formatting changes that cargo fmt
insisted on when commiting.
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
To reproduce, run the slide_puzzle with a SLINT_SCALE_FACTOR of 1.5 with
the software renderer.
The bug is that some text are rendered at some location, with an offset
of, say, 400.499999. And then the left and right side of the bounding
rectangle may be rounded differently and we may get to draw images that
are bigger than the glyph which cause panic. Fix that by ensuring we
never do that.
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.