Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target = "wasm32-unknown-unknown"
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
name = "plotters-canvas"
version = "0.3.1"
authors = ["Hao Hou <[email protected]>"]
edition = "2018"
edition = "2021"
license = "MIT"
description = "Plotters HTML5 Canvas Backend"
homepage = "https://plotters-rs.github.io"
repository = "https://github.com/plotters-rs/plotters-canvas"
readme = "README.md"
resolver = "2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies.plotters-backend]
git = "https://github.com/plotters-rs/plotters"
version = "0.3"

[dependencies]
js-sys= "0.3.32"
Expand All @@ -27,4 +28,4 @@ wasm-bindgen-test = "^0.3.17"

[dev-dependencies.plotters]
default_features = false
git = "https://github.com/plotters-rs/plotters"
version = "0.3"
6 changes: 3 additions & 3 deletions src/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,19 +556,19 @@ mod test {
// not horizontal nor vertical
assert_eq!(
((10.0, 10.0), (20.0, 20.0)),
fine_hor_ver_lines((10.0, 10.0), (20.0, 20.0))
fine_hor_ver_lines((10, 10), (20, 20))
);

// vertical
assert_eq!(
((9.5, 10.0), (19.5, 10.0)),
fine_hor_ver_lines((10.0, 10.0), (20.0, 10.0))
fine_hor_ver_lines((10, 10), (20, 10))
);

// horizontal
assert_eq!(
((10.0, 9.5), (10.0, 19.5)),
fine_hor_ver_lines((10.0, 10.0), (10.0, 20.0))
fine_hor_ver_lines((10, 10), (10, 20))
);
}
}