-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
94 additions
and
655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
pub mod geom; | ||
pub mod graphics; | ||
pub mod path; | ||
pub mod render; | ||
|
||
pub use geom::*; | ||
pub use graphics::*; | ||
pub use path::*; | ||
pub use render::*; | ||
|
||
#[derive(Copy, Clone, Debug)] | ||
pub struct Color { | ||
pub r: f32, pub g: f32, pub b: f32, pub a: f32, | ||
} | ||
|
||
impl Color { | ||
pub fn new(r: f32, g: f32, b: f32, a: f32) -> Color { | ||
Color { r, g, b, a } | ||
} | ||
|
||
pub fn premultiply(r: f32, g: f32, b: f32, a: f32) -> Color { | ||
Color { r: a * r, g: a * g, b: a * b, a } | ||
} | ||
} |
Oops, something went wrong.