mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
See previous commit for details We now support parsing of `display-p3-linear` (although it just falls back to using Oklab since Skia doesn't support it)
43 lines
1000 B
C++
43 lines
1000 B
C++
/*
|
|
* Copyright (c) 2023, MacDue <macdue@dueutil.tech>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Span.h>
|
|
#include <AK/Vector.h>
|
|
#include <LibGfx/Gradients.h>
|
|
#include <LibWeb/CSS/StyleValues/ColorInterpolationMethodStyleValue.h>
|
|
#include <LibWeb/Forward.h>
|
|
|
|
namespace Web::Painting {
|
|
|
|
using ColorStopList = Vector<Gfx::ColorStop, 4>;
|
|
|
|
struct ColorStopData {
|
|
ColorStopList list;
|
|
Optional<float> repeat_length;
|
|
bool repeating { false };
|
|
};
|
|
|
|
struct LinearGradientData {
|
|
float gradient_angle;
|
|
ColorStopData color_stops;
|
|
CSS::ColorInterpolationMethodStyleValue::ColorInterpolationMethod interpolation_method;
|
|
};
|
|
|
|
struct ConicGradientData {
|
|
float start_angle;
|
|
ColorStopData color_stops;
|
|
CSS::ColorInterpolationMethodStyleValue::ColorInterpolationMethod interpolation_method;
|
|
};
|
|
|
|
struct RadialGradientData {
|
|
ColorStopData color_stops;
|
|
CSS::ColorInterpolationMethodStyleValue::ColorInterpolationMethod interpolation_method;
|
|
};
|
|
|
|
}
|