aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2024-02-05 20:00:07 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2024-02-05 20:00:07 +0000
commit3649147f148948a98b31a01cf315a92d5dfb7326 (patch)
tree8c89bf77d2750b00466b529246e42ce880404c5e
parent461721ae0629a253c87e2fc1157bf96748374c18 (diff)
parent0c14e3f5b575d149a082fb7923d698364c998006 (diff)
downloadplotters-backend-main.tar.gz
Upgrade plotters-backend to 0.3.5 am: 0c14e3f5b5HEADmastermain
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/plotters-backend/+/2946789 Change-Id: I853af22517044fc28e0384f32ccc45777374f5fa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml2
-rw-r--r--Cargo.toml.orig2
-rw-r--r--LICENSE22
-rw-r--r--METADATA25
-rw-r--r--README.md2
-rw-r--r--src/rasterizer/mod.rs2
-rw-r--r--src/rasterizer/path.rs4
9 files changed, 20 insertions, 43 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 08b1a92..4b494bf 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "6bd30045e545e7308b1349c6ffaaa22a4c6eeb94"
+ "sha1": "73663bf8f9a5151c02e28bfbdab3e240bb8c1811"
},
"path_in_vcs": "plotters-backend"
} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index e78ff2c..4e32142 100644
--- a/Android.bp
+++ b/Android.bp
@@ -25,7 +25,7 @@ rust_library {
host_supported: true,
crate_name: "plotters_backend",
cargo_env_compat: true,
- cargo_pkg_version: "0.3.4",
+ cargo_pkg_version: "0.3.5",
srcs: ["src/lib.rs"],
edition: "2018",
apex_available: [
diff --git a/Cargo.toml b/Cargo.toml
index dc4d6b3..7fd1039 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "plotters-backend"
-version = "0.3.4"
+version = "0.3.5"
authors = ["Hao Hou <haohou302@gmail.com>"]
description = "Plotters Backend API"
homepage = "https://plotters-rs.github.io"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 9a2ba85..c3aa8cb 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "plotters-backend"
-version = "0.3.4"
+version = "0.3.5"
authors = ["Hao Hou <haohou302@gmail.com>"]
edition = "2018"
license = "MIT"
diff --git a/LICENSE b/LICENSE
index 905e4b2..ea5b606 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1 @@
-MIT License
-
-Copyright (c) 2019 Hao Hou <haohou302@gmail.com>
-
-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 f4439cd..98e69cc 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-backend
-# 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-backend
+# For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md
name: "plotters-backend"
description: "Plotters Backend API"
third_party {
- url {
- type: HOMEPAGE
- value: "https://crates.io/crates/plotters-backend"
- }
- url {
- type: ARCHIVE
- value: "https://static.crates.io/crates/plotters-backend/plotters-backend-0.3.4.crate"
- }
- version: "0.3.4"
license_type: NOTICE
last_upgrade_date {
- year: 2022
- month: 12
- day: 13
+ year: 2024
+ month: 2
+ day: 5
+ }
+ homepage: "https://crates.io/crates/plotters-backend"
+ identifier {
+ type: "Archive"
+ value: "https://static.crates.io/crates/plotters-backend/plotters-backend-0.3.5.crate"
+ version: "0.3.5"
}
}
diff --git a/README.md b/README.md
index dc7720b..871fc7c 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/rasterizer/mod.rs b/src/rasterizer/mod.rs
index d322391..b475acd 100644
--- a/src/rasterizer/mod.rs
+++ b/src/rasterizer/mod.rs
@@ -10,7 +10,7 @@
// the question mark operator has a huge performance impact due to LLVM unable to handle it.
// So the question is if this trick is still useful, or LLVM is smart enough to handle it since
// then.
-//
+//
// --
// Original comment:
//
diff --git a/src/rasterizer/path.rs b/src/rasterizer/path.rs
index 35ae604..eae0bfe 100644
--- a/src/rasterizer/path.rs
+++ b/src/rasterizer/path.rs
@@ -34,8 +34,8 @@ fn compute_polygon_vertex(triple: &[BackendCoord; 3], d: f64, buf: &mut Vec<Back
f64::from(triple[1].1) + d * b_n.1,
);
- // If they are actually the same point, then the 3 points are colinear, so just emit the point.
- if a_p.0 as i32 == b_p.0 as i32 && a_p.1 as i32 == b_p.1 as i32 {
+ // Check if 3 points are colinear. If so, just emit the point.
+ if a_t.1 * b_t.0 == a_t.0 * b_t.1 {
buf.push((a_p.0 as i32, a_p.1 as i32));
return;
}