qt: support outlining (border) in `RoundImage` and rename it to `ImageExt`
Having the border directly in the shader is better for rendering performance, and it also allows the outline (border) to fit seamlessly as with a separate Rectangle
we can not guarantee the curvature compatibility.
I also make it possible to always support background coloring, basically a This is too much complexity for little reason, it got dropped. Do not use software mode if these are needed.Rectangle
is created and delegated for displaying the background if shader effect is not available (no support or radius is 0.0). I do the same for border with another rectangle sitting on top.
Draft because: I have added a workaround patch for this.
Unfortunately, this exposes a Qt scene graph bug that MusicArtistDelegate
's round image does not get rendered. The problem is probably something about the optimizations QSGBatchRenderer
(https://github.com/qt/qtdeclarative/blob/dev/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp) does. Maybe it thinks that there is an opaque element on top of round image, so it does not ask the graphics backend to render the node.
This bug can not be observed currently because for some reason if there is a scene graph node behind (current case), I do not experience it. I really do not know why, but I think this is likely a Qt bug. I'm open to suggestions.
Request review @chub.