pub struct Gradient {
pub style: GradientStyle,
pub start: Color,
pub end: Color,
pub angle: f32,
pub border: f32,
pub center: (f32, f32),
}Expand description
One of a document’s named gradients.
ODF 1.3 also permits a list of loext:gradient-stop children, which
LibreOffice writes alongside the two colour attributes and which say the same
thing for a two-stop gradient. The attributes are read and the stops are not:
every gradient in the corpus has exactly two stops that repeat what
draw:start-color and draw:end-color already say, and a renderer that
interpolated more of them would be drawing something no fixture can check.
Fields§
§style: GradientStyleHow it runs.
start: ColorThe colour it begins at.
end: ColorThe colour it ends at.
angle: f32The direction, in degrees. ODF measures it counter-clockwise from the direction that runs bottom to top, so 0 is upward and 90 points left.
border: f32How much of each end is the flat colour before the blend begins, as a proportion of the whole.
center: (f32, f32)Where the centre is, for the styles that have one, as a proportion of the shape’s width and height.