2023-10-15 04:27:48 +02:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2020, Andreas Kling <andreas@ladybird.org>
|
2023-10-15 04:27:48 +02:00
|
|
|
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-11-19 22:03:48 +01:00
|
|
|
#include <LibGfx/Color.h>
|
|
|
|
#include <LibWeb/CSS/ComputedValues.h>
|
|
|
|
#include <LibWeb/CSS/Enums.h>
|
|
|
|
#include <LibWeb/PixelUnits.h>
|
|
|
|
|
2023-10-15 04:27:48 +02:00
|
|
|
namespace Web::Painting {
|
|
|
|
|
2023-11-19 22:03:48 +01:00
|
|
|
struct BorderDataDevicePixels {
|
|
|
|
public:
|
|
|
|
Color color { Color::Transparent };
|
|
|
|
CSS::LineStyle line_style { CSS::LineStyle::None };
|
|
|
|
DevicePixels width { 0 };
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BordersDataDevicePixels {
|
|
|
|
BorderDataDevicePixels top;
|
|
|
|
BorderDataDevicePixels right;
|
|
|
|
BorderDataDevicePixels bottom;
|
|
|
|
BorderDataDevicePixels left;
|
|
|
|
};
|
|
|
|
|
2023-10-15 04:27:48 +02:00
|
|
|
struct BordersData {
|
|
|
|
CSS::BorderData top;
|
|
|
|
CSS::BorderData right;
|
|
|
|
CSS::BorderData bottom;
|
|
|
|
CSS::BorderData left;
|
2023-11-19 22:03:48 +01:00
|
|
|
|
|
|
|
BordersDataDevicePixels to_device_pixels(PaintContext const& context) const;
|
2023-10-15 04:27:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|