Fix gradient math and positioning. Formatting.

Start adding repeating gradients.
This commit is contained in:
Pyfisch 2017-04-17 10:50:14 +02:00
parent 6768614fdd
commit 803bc0395c
3 changed files with 175 additions and 179 deletions

View file

@ -890,6 +890,9 @@ pub struct Gradient {
/// A list of color stops.
pub stops: Vec<GradientStop>,
/// True if gradient repeats infinitly.
pub repeating: bool,
}
#[derive(Clone, Deserialize, HeapSizeOf, Serialize)]
@ -912,6 +915,9 @@ pub struct RadialGradient {
/// A list of color stops.
pub stops: Vec<GradientStop>,
/// True if gradient repeats infinitly.
pub repeating: bool,
}
#[derive(Clone, Deserialize, HeapSizeOf, Serialize)]
@ -923,7 +929,6 @@ pub struct RadialGradientDisplayItem {
pub gradient: RadialGradient,
}
/// A normal border, supporting CSS border styles.
#[derive(Clone, HeapSizeOf, Deserialize, Serialize)]
pub struct NormalBorder {