first commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "color-engine"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
@@ -0,0 +1,6 @@
|
||||
pub struct CMYK {
|
||||
pub c: u32,
|
||||
pub m: u32,
|
||||
pub y: u32,
|
||||
pub k: u32,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
pub struct HSV {
|
||||
pub h: u32,
|
||||
pub s: u32,
|
||||
pub v: u32,
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
use crate::core::color_model::hsv::HSV;
|
||||
|
||||
pub struct RGB {
|
||||
pub r: u32,
|
||||
pub g: u32,
|
||||
pub b: u32,
|
||||
}
|
||||
|
||||
impl RGB {
|
||||
pub fn new_from_hsv(hsv: HSV) -> Self {
|
||||
let h = hsv.h;
|
||||
Self {
|
||||
r: 32,
|
||||
g: 32,
|
||||
b: 32,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
pub struct LayerBase {
|
||||
pub isLocked: bool,
|
||||
pub isHided: bool,
|
||||
pub optic: f32,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
pub struct ShapeBase {
|
||||
pub width: i32,
|
||||
pub height: i32,
|
||||
pub rotation: i32,
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
pub mod core {
|
||||
pub mod color_model {
|
||||
pub mod cmyk;
|
||||
pub mod hsv;
|
||||
pub mod rgb;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod tool {
|
||||
pub mod shape {
|
||||
pub mod square;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
pub struct Layer {}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user