Anki/proto/anki
Aristotelis c828a2eb6f
Add APIs for IO card rendering (#2739)
* Refactor: Add index to shapes package

* Add shape draw callback API to setupImageCloze

* Expose IO drawing API, switch away from image cloze naming

We currently use "image occlusion" in most places, but some references to "image cloze" still remain. For consistency's sake and to make it easier to quickly find IO-related code, this commit replaces all remaining references to "image cloze", only maintaining those required for backwards compatibility with existing note types.

* Add cloze ordinal to shapes

* Do not mutate original shapes during (de)normalization

Mutating shapes would be a recipe for trouble when combined with IO API use by external consumers.

(makeNormal(makeAbsolute(makeNormal())) is not idempotent,
and keeping track of the original state would introduce
additional complexity with no discernible performance benefit
or otherwise.)

* Tweak IO API, allowing modifications to ShapeProperties

* Tweak drawShape parameters

* Switch method order

For consistency with previous implementation

* Run Rust formatters

* Simplify position (de)normalization

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-20 09:36:46 +10:00
..
ankidroid.proto More service generation refactoring 2023-06-22 09:46:09 +10:00
ankiweb.proto Change Anki's version scheme; bump to 23.09 (#2640) 2023-09-07 12:37:15 +10:00
backend.proto Remove v1/v2 support from the backend (#2727) 2023-10-14 10:50:59 +10:00
card_rendering.proto Rework RenderCardOutput::question/answer 2023-06-27 00:37:41 +10:00
cards.proto Store desired retention in card data 2023-09-23 15:42:42 +10:00
collection.proto Integrate FSRS into Anki (#2654) 2023-09-16 16:09:26 +10:00
config.proto Remove v1/v2 support from the backend (#2727) 2023-10-14 10:50:59 +10:00
deck_config.proto Remove v1/v2 support from the backend (#2727) 2023-10-14 10:50:59 +10:00
decks.proto More service generation refactoring 2023-06-22 09:46:09 +10:00
frontend.proto Improve presentation of importing results (#2568) 2023-08-02 20:29:44 +10:00
generic.proto Add java_multiple_files option to proto files 2022-06-27 15:16:04 +10:00
i18n.proto More service generation refactoring 2023-06-22 09:46:09 +10:00
image_occlusion.proto Add APIs for IO card rendering (#2739) 2023-10-20 09:36:46 +10:00
import_export.proto Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
links.proto More service generation refactoring 2023-06-22 09:46:09 +10:00
media.proto Add a backend method to extract static media references (#2716) 2023-10-11 14:10:02 +10:00
notes.proto Add a backend method to add notes in bulk (#2659) 2023-09-16 13:51:32 +10:00
notetypes.proto Fix misleading warning when changing notetype from/to cloze (#2744) 2023-10-18 16:50:32 +10:00
scheduler.proto Update FSRS 2023-09-30 16:10:22 +10:00
search.proto Invalid sorting (#2709) 2023-10-07 06:36:15 +00:00
stats.proto Add stability graph 2023-10-01 15:44:33 +10:00
sync.proto Refactor media sync handling (#2647) 2023-09-10 13:22:20 +10:00
tags.proto More service generation refactoring 2023-06-22 09:46:09 +10:00