From 9a7bdb0c031f829d7ee632abed7cbe757e4313a4 Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Mon, 5 Feb 2024 09:35:50 +0100 Subject: Upgrade plotters-svg to 0.3.5 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update external/rust/crates/plotters-svg For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I8a8bc5a010699d4c97d65a4020c33ccba36b819c --- .cargo_vcs_info.json | 2 +- Android.bp | 2 +- Cargo.toml | 4 ++-- Cargo.toml.orig | 6 +++--- LICENSE | 22 +--------------------- METADATA | 25 +++++++++++-------------- README.md | 2 +- src/svg.rs | 2 +- 8 files changed, 21 insertions(+), 44 deletions(-) diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 4ee3b83..c0073c8 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "740a302591a902b11398d32926365330927b9372" + "sha1": "8aeeba24564f3395aa4c759afb404ac854d4d8dd" }, "path_in_vcs": "plotters-svg" } \ No newline at end of file diff --git a/Android.bp b/Android.bp index 993d717..07c476d 100644 --- a/Android.bp +++ b/Android.bp @@ -23,7 +23,7 @@ rust_library { host_supported: true, crate_name: "plotters_svg", cargo_env_compat: true, - cargo_pkg_version: "0.3.3", + cargo_pkg_version: "0.3.5", srcs: ["src/lib.rs"], edition: "2018", rustlibs: ["libplotters_backend"], diff --git a/Cargo.toml b/Cargo.toml index 011f0ad..e659289 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ [package] edition = "2018" name = "plotters-svg" -version = "0.3.3" +version = "0.3.5" authors = ["Hao Hou "] description = "Plotters SVG backend" homepage = "https://plotters-rs.github.io" @@ -31,7 +31,7 @@ optional = true default-features = false [dependencies.plotters-backend] -version = "0.3" +version = "0.3.5" [dev-dependencies] diff --git a/Cargo.toml.orig b/Cargo.toml.orig index dfdc2cd..cd1e6d4 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "plotters-svg" -version = "0.3.3" +version = "0.3.5" authors = ["Hao Hou "] edition = "2018" license = "MIT" @@ -12,8 +12,8 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies.plotters-backend] -#path = "../plotters-backend" -version = "0.3" +version = "0.3.5" +path = "../plotters-backend" [dependencies.image] version = "0.24.2" diff --git a/LICENSE b/LICENSE index 905e4b2..ea5b606 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1 @@ -MIT License - -Copyright (c) 2019 Hao Hou - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +../LICENSE \ No newline at end of file diff --git a/METADATA b/METADATA index 9f51ecd..76b5a17 100644 --- a/METADATA +++ b/METADATA @@ -1,23 +1,20 @@ # This project was upgraded with external_updater. -# Usage: tools/external_updater/updater.sh update rust/crates/plotters-svg -# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md +# Usage: tools/external_updater/updater.sh update external/rust/crates/plotters-svg +# For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md name: "plotters-svg" description: "Plotters SVG backend" third_party { - url { - type: HOMEPAGE - value: "https://crates.io/crates/plotters-svg" - } - url { - type: ARCHIVE - value: "https://static.crates.io/crates/plotters-svg/plotters-svg-0.3.3.crate" - } - version: "0.3.3" license_type: NOTICE last_upgrade_date { - year: 2022 - month: 12 - day: 13 + year: 2024 + month: 2 + day: 5 + } + homepage: "https://crates.io/crates/plotters-svg" + identifier { + type: "Archive" + value: "https://static.crates.io/crates/plotters-svg/plotters-svg-0.3.5.crate" + version: "0.3.5" } } diff --git a/README.md b/README.md index 41b18b2..0d38126 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ This is a part of plotters project. For more details, please check the following links: - For high-level intro of Plotters, see: [Plotters on crates.io](https://crates.io/crates/plotters) -- Check the main repo at [Plotters repo](https://github.com/38/plotters.git) +- Check the main repo at [Plotters repo](https://github.com/plotters-rs/plotters.git) - For detailed documentation about this crate, check [plotters-backend on docs.rs](https://docs.rs/plotters-backend/) - You can also visit Plotters [Homepage](https://plotters-rs.github.io) diff --git a/src/svg.rs b/src/svg.rs index 43bf36a..7ea105d 100644 --- a/src/svg.rs +++ b/src/svg.rs @@ -8,12 +8,12 @@ use plotters_backend::{ FontStyle, FontTransform, }; +use std::fmt::Write as _; use std::fs::File; #[allow(unused_imports)] use std::io::Cursor; use std::io::{BufWriter, Error, Write}; use std::path::Path; -use std::fmt::Write as _; fn make_svg_color(color: BackendColor) -> String { let (r, g, b) = color.rgb; -- cgit v1.2.3