Sometimes, BorderRectangle clips can get negative if the intersection
of two rectangle leads to a rectangle that is smaller than the previous
rectangle, but because of floating point error while computing the max
position, the resulting clip may still be negative.
Add a small value to compensate that error
When closing a popup, notify the platform window, so that the mcu
backend can remember that region and start the dirty region with it.
Also, free all the rendering cache items of deleted items, to avoid accidental re-use
when re-opening a popup.
We need to use round_in() instead of cast() as cast() discard
too much data if both the x position and the width position are 0.5
then we loose one pixel of width
The computation of the coordinate was not correct. The coordinate was
turncated in the case of Image. And for Text, the image was drawn smaller
instead of being clipped
Commit 738ac0dc01 increased the size of the ImageInner::StaticTextures variant,
which breaks the size assertions in the interpreter ffi build.
This changes fixes that by reducing the size of the ImageInner variant again by
moving all the fields into a separate struct.
Profile different stages behind a slint_debug_performance cfg and feed the result into debug_log!
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
The code was mixing logical and physical sizes, causing glyphs being
doubly scaled down. Instead, this patch introduces:
* Physical* and Logical* euclid length/size/rect aliases
* some extraction traits for getting the scalars in rects/sizes as lengths (until euclid has them
built-in)
* wrapper traits/types for safely extracting the physical font metrics the
compiler generates (i16)
* Fix a bug in the text height calculation where we failed to take the
descent into account
Move the specific data out of SceneItem into separate vectors. This makes the process of
sorting/moving scene items faster (less memory to move) and makes rectangle rich scenes
consume less memory.
This also paves the way for a "SimpleSceneTexture" vs. a more complex texture.
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename