Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Circles (part 2): stroke pattern

Description

!60 (merged) was missing stroke patterns. There was some discussion and a decision on how to implement this in https://gitlab.e.foundation/e/os/backlog/-/issues/913#note_346077.

Screenshots

Screenshot_from_2023-02-14_19-54-54

On a real device the stroke on the right renders colorfully as well:

real device video

(Whereas this video is missing the gap between the dots for demo purposes)

Technical details

Renders the outline pattern as a bitmap, to pass it to MapLibre as a stroke pattern.

Once https://github.com/maplibre/maplibre-gl-native/issues/744 is implemented, we can do a better implementation here as well! I'll open a new corresponding issue after this MR is merged.

Note: This MR also contains https://github.com/microg/GmsCore/commit/24b0bfa998a23ace0851e5181cf5f3c13db28b5c, necessary to interpret the stroke pattern objects received from gms correctly.

Tests

  1. Select all different stroke patterns.
  2. Change stroke width, stroke will adjust accordingly.
  3. Zoom in to map – this leads to the pattern getting stretched until the next full zoom step.

As previously, note: dragging the marker crashes the app. When a marker is dragged, the sample app wants to update the circle, so the source is changed by the annotation plugin to reflect the changed radius. This means that the marker is re-inserted to the map by the annotation plugin. This means that the drag is stopped. This means that the app wants to update the circle, so the source is changed by the annotation plugin. … Possible workaround is delaying the drag callbacks to next UI draw, however this still makes dragging very laggy. This is however not really related to this MR and needs separate fixing of dragging functionality.

Issues

10 commandments of code reviews

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/development/code-review

Merge request reports

Loading