rendering: Simplify Cairo context usage, remove unneeded calls.

Moved Cairo context usage to Rust, and rearranged ctx setup (position) to happen in one place.

Removed render calls that were overwritten on each draw call anyway.
This commit is contained in:
Dorota Czaplejewicz
2019-12-02 16:45:25 +00:00
parent 6e32a2ef41
commit f9fbd3fb2d
11 changed files with 310 additions and 204 deletions

3
Cargo.lock generated
View File

@ -324,6 +324,9 @@ name = "rs"
version = "0.1.0"
dependencies = [
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cairo-rs 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cairo-sys-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gdk 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",