Skip to content

Commit 304bbd8

Browse files
committed
Refactor into Cargo workspace
1 parent edde0cc commit 304bbd8

File tree

8 files changed

+34
-20
lines changed

8 files changed

+34
-20
lines changed

Cargo.toml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
[package]
2-
name = "rotated-grid"
3-
description = "Rotated grid calculations for CMYK halftone dithering and more"
4-
version = "0.1.0"
5-
edition = "2021"
6-
keywords = ["halftone", "image-processing", "grid"]
7-
categories = ["multimedia::images", "mathematics"]
8-
repository = "https://github.com/sunsided/rotated-grid"
9-
license-file = "LICENSE.md"
10-
readme = "README.md"
11-
rust-version = "1.59"
12-
13-
[dependencies]
14-
15-
[dev-dependencies]
16-
opencv = { version = "0.82.1", default-features = false, features = ["imgproc", "imgcodecs", "highgui"] }
17-
18-
[[example]]
19-
name = "cmyk"
20-
path = "examples/cmyk.rs"
1+
[workspace]
2+
default-members = ["crates/*"]
3+
members = ["crates/*", "examples/*"]

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ _For halftone dithering and more._
44

55
This crate generates grid coordinates at a specified offset along a rotated grid.
66

7+
## Usage example
8+
79
```rust
810
use rotated_grid::{Angle, GridPositionIterator, GridCoordinate};
911

@@ -43,3 +45,9 @@ fn main() {
4345
}
4446
}
4547
```
48+
49+
You can run the example application using
50+
51+
```shell
52+
cargo run --package cmyk
53+
```

crates/rotated-grid/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "rotated-grid"
3+
description = "Rotated grid calculations for CMYK halftone dithering and more"
4+
version = "0.1.0"
5+
edition = "2021"
6+
keywords = ["halftone", "image-processing", "grid"]
7+
categories = ["multimedia::images", "mathematics"]
8+
repository = "https://github.com/sunsided/rotated-grid"
9+
license-file = "../../LICENSE.md"
10+
readme = "../../README.md"
11+
rust-version = "1.59"
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/cmyk/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "cmyk"
3+
description = "CMYK halftone dithering example"
4+
version = "0.1.0"
5+
edition = "2021"
6+
keywords = ["halftone", "image-processing", "grid"]
7+
repository = "https://github.com/sunsided/rotated-grid"
8+
publish = false
9+
10+
[dependencies]
11+
rotated-grid = { path = "../../crates/rotated-grid" }
12+
opencv = { version = "0.82.1", default-features = false, features = ["imgproc", "imgcodecs", "highgui"] }
File renamed without changes.

0 commit comments

Comments
 (0)