Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Add Clone and Eq on cssparser::Color.
  • Loading branch information
SimonSapin committed Sep 3, 2013
commit e02f8ada9de83dd70f573112b85ba34711242686
4 changes: 4 additions & 0 deletions color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ mod color_data;
pub type ColorFloat = c_float;


#[deriving(Clone)]
#[deriving(Eq)]
pub struct RGBA {
// All in 0..1
red: ColorFloat,
Expand All @@ -23,6 +25,8 @@ pub struct RGBA {
alpha: ColorFloat,
}

#[deriving(Clone)]
#[deriving(Eq)]
pub enum Color {
CurrentColor,
RGBA(RGBA),
Expand Down