/* * Copyright (c) 2022, MacDue * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include namespace Web::Painting { struct ColorStop { Gfx::Color color; float position = 0; }; using ColorStopList = Vector; struct LinearGradientData { float gradient_angle; ColorStopList color_stops; }; LinearGradientData resolve_linear_gradient_data(Layout::Node const&, Gfx::FloatRect const&, CSS::LinearGradientStyleValue const&); void paint_linear_gradient(PaintContext&, Gfx::IntRect const&, LinearGradientData const&); }