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
This allows filling glyphs with gradients. However femtovg
appears to apply the start/end position per-glyph
instead of globally - resulting in a different result than Qt.
The fallback list has changed slightly and it appears that SIP is
slowing down reading ~75MB font files.
This is sub-optimal though, font-kit shouldn't assert on certain fonts
and it should really mmap fonts instead of
reading them into memory.
Add support for built-in property aliases and rename `color` to
`background` - in preparation for it also changing to type brush.
Right now the alias is silent, a deprecation and overall change
will come in a subsequent change.
Rendering a circle using `rounded_rect` will create a path with `LineTo`
verbs for the edges. Unfortunately those create visible artefacts,
especially in lower resolutions.
Therefore this patch attempts to detect this scenario and draw a circle instead.
Fixes#152
We can use fontdb on all platforms, which gives consistent font query
behavior of application fonts. And then we also don't need our hand-made
"db" anymore for the wasm build and the included DejaVu font.
When a tile is open artifacts would be visible around the edge of the
tile. That's because a zero width rectangle would cause pixels to appear
with femtovg. The Qt backend however has an early abort in
`get_geometry!`.
This patches applies the same early-abort semantics to both backends and
switches to `<= 0`, corresponding to euclid::Size's `is_empty()`.
This intends to provide a configurable rectangular "drop shadow". The
API is modeled after CSS/HTML5 Canvas where the element can be "bound"
to an existing rectangular shape (geometry and radius), the offset can
be used to place the shadow and color and blur configure the shadow.
The shadow's color fades into transparent.
TODO (in subsequent changes):
* Documentation
* Qt implementation
With commit
9ca87ab312
and
c62b0e5316
the winit event loop sends our KeyPress for
winit::event::WindowEvent::KeyboardInput only when the virtual key code
matches our specially encoded keys. For regular keys we rely on
winit::event::WindowEvent::ReceivedCharacter, for which we sent only
KeyRelease (which TextInput listens for), but not KeyPressed. With
this patch we simulate press & release.
* Rename logo to the more generic meta as keyboard modifier.
* Use control as the real modifier and map command key to it with
winit and keep Qt semantics as-is.
We rely on ReceivedCharacter to send the event to the item for
combinations like Ctrl+C, instead of the single KeyEvent from winit. We
use the latter only for special key codes.
This will give a nicer API to expose to .60. If the struct weren't
repr(C) then the booleans would be nicely packed, but alas that's not
happening. On the other hand we're not keeping many instances of them
around.
Fold CharacterInput into KeyPressed/KeyReleased and store the "key" as a string.
Also, instead of exposing the KeyCode we're encoding special characters
into the string.