Remove gfx_traits from the dependencies of [script].

This commit is contained in:
Mátyás Mustoha 2015-06-12 12:59:46 +02:00
parent f163f2bf0d
commit 3ae64fe739
5 changed files with 18 additions and 17 deletions

View file

@ -70,7 +70,7 @@ pub enum Canvas2dMsg {
SetShadowOffsetX(f64),
SetShadowOffsetY(f64),
SetShadowBlur(f64),
SetShadowColor(AzColor),
SetShadowColor(RGBA),
}
#[derive(Clone)]
@ -455,3 +455,16 @@ impl CompositionOrBlending {
None
}
}
pub trait ToAzColor {
fn to_azcolor(&self) -> AzColor;
}
impl ToAzColor for RGBA {
fn to_azcolor(&self) -> AzColor {
color::rgba(self.red as AzFloat,
self.green as AzFloat,
self.blue as AzFloat,
self.alpha as AzFloat)
}
}