mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Implement radial gradients for borders.
The property border-image-outset is not yet implemented. Note: Also support repeating-linear-gradients for borders.
This commit is contained in:
parent
a956e3fd52
commit
b230be8aaf
3 changed files with 50 additions and 3 deletions
|
@ -976,12 +976,23 @@ pub struct GradientBorder {
|
|||
pub outset: SideOffsets2D<f32>,
|
||||
}
|
||||
|
||||
/// A border that is made of radial gradient
|
||||
#[derive(Clone, HeapSizeOf, Deserialize, Serialize)]
|
||||
pub struct RadialGradientBorder {
|
||||
/// The gradient info that this border uses, border-image-source.
|
||||
pub gradient: RadialGradient,
|
||||
|
||||
/// Outsets for the border, as per border-image-outset.
|
||||
pub outset: SideOffsets2D<f32>,
|
||||
}
|
||||
|
||||
/// Specifies the type of border
|
||||
#[derive(Clone, HeapSizeOf, Deserialize, Serialize)]
|
||||
pub enum BorderDetails {
|
||||
Normal(NormalBorder),
|
||||
Image(ImageBorder),
|
||||
Gradient(GradientBorder),
|
||||
RadialGradient(RadialGradientBorder),
|
||||
}
|
||||
|
||||
/// Paints a border.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue