Remove the `application` infix from `register_application_font`, to
reduce the changes that it might be interpreted to be a function that
also changes the default font in all text elements.
Since colorize property force the native item to be a ClippedImage, it had
a source rectangle, despite with and height defaulting to 0 and therefore
having an empty source rect would cause the scaling to not be right
Have a function first called before the children, and then the main function
called after the children if they did not accept the event. This will allow
processing the Flickable gesture properly
Remove the pos parameter to the render functions and instead let
the item renderer apply the transformation on the rendere (femtovg
canvas or QPainter).
So `draw_*` functions in the backend now always operate in item local
coordinates.
Commit 8a66af0746 resulted in pending html
images not being strongly referenced anymore through the item's
rendering cache when first queried in the image size query. That means
they initially reported a size (1x1) and after loading they *should*
mark the bindings dirty that depend on the implicit size, but since the
image was deleted (and along with it the notifying property), the image
kept its visible (1x1) size.
Similarly, images would get loaded too much from disk - same cause,
different effect.
To fix this, go back to the earlier design where the renderer's image
cache keeps a strong reference.
Don't use the item's rendering cache to determine the image size, as
that's soley for rendering. The Qt backend doesn't use the item cache
and the GL backend neither after this change. Instead both backends have
a cache for decoded images.
There are two problems that this patch fixes:
* It may happen that the image is not loaded yet, which means
we need to wait with the colorization effect instead of colorizing
the dummy (1x1) texture.
* It may happen that we transition from a regular image to one
that has a valid colorization brush, in which case we need to
invalidate the graphics item cache.
We're using `Canvas::intersect_scissor` to combine the viewport clip of
the flickable with any child `Clip` element, for example. Unfortunately
`intersect_scissor` has a bug and this patch works around it by doing
the scissor intersection manually. This works because we don't apply a
global transform on the canvas -- all scaling and translation is done
locally in the draw functions.
The inner fill rect needs to follow the shape of the original rectangle.
When it has a radius we need to bleed it "slightly" into the shadow rect to avoid gaps,
and then draw it before the shadow.
Fixes#156