anki/rslib
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
..
benches Update Rust and Python deps (#2567) 2023-07-01 18:26:43 +10:00
i18n Stop including Qt translations when EXTRA_FTL_ROOT provided 2023-07-04 18:26:27 +10:00
io Tooltips for CSV import and import page refactoring (#2655) 2023-09-14 09:06:15 +10:00
linkchecker Drop workspace-hack in favor of workspace deps 2023-06-23 17:41:31 +10:00
process Refactor media sync handling (#2647) 2023-09-10 13:22:20 +10:00
proto Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
proto_gen Update nightly formatter 2023-09-02 16:13:50 +10:00
src Add APIs for IO card rendering (#2739) 2023-10-20 09:36:46 +10:00
sync Support creating a standalone sync server 2023-07-02 18:22:44 +10:00
tests/support move linkchecker into separate crate 2021-12-20 17:27:43 +10:00
.gitignore
bench.sh Update Rust and Python deps (#2567) 2023-07-01 18:26:43 +10:00
build.rs Fix building outside workspace 2023-07-02 18:22:44 +10:00
Cargo.toml Update incompatible Rust deps 2023-09-28 10:00:47 +10:00
README.md Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
rust_interface.rs Update nightly formatter 2023-09-02 16:13:50 +10:00

Anki's Rust code.