Adding transparent white.

Using helper color function (less verbose and clear to understand).
This commit is contained in:
Adenilson Cavalcanti 2015-04-21 17:13:15 -07:00
parent 23945f2ea8
commit 95bcc5747c
2 changed files with 6 additions and 1 deletions

View file

@ -39,3 +39,8 @@ pub fn transparent_black() -> AzColor {
pub fn white() -> AzColor { pub fn white() -> AzColor {
AzColor { r: 1.0, g: 1.0, b: 1.0, a: 1.0 } AzColor { r: 1.0, g: 1.0, b: 1.0, a: 1.0 }
} }
#[inline]
pub fn transparent_white() -> AzColor {
AzColor { r: 1.0, g: 1.0, b: 1.0, a: 0.0 }
}

View file

@ -1318,7 +1318,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
ScrollPolicy::Scrollable ScrollPolicy::Scrollable
}; };
let transparent = color::rgba(1.0, 1.0, 1.0, 0.0); let transparent = color::transparent_white();
let stacking_context = let stacking_context =
self.create_stacking_context(display_list, self.create_stacking_context(display_list,
Some(Arc::new(PaintLayer::new(self.layer_id(0), Some(Arc::new(PaintLayer::new(self.layer_id(0),