mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-26 18:09:45 +00:00
LibGfx: Rename Path => DeprecatedPath
This commit is contained in:
parent
de50d27870
commit
c8f09312f7
Notes:
github-actions[bot]
2024-08-20 07:38:22 +00:00
Author: https://github.com/awesomekling
Commit: c8f09312f7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1024
61 changed files with 216 additions and 216 deletions
|
|
@ -255,9 +255,9 @@ public:
|
|||
return FloatLine { TRY(read_point()), TRY(read_point()) };
|
||||
}
|
||||
|
||||
ErrorOr<Path> read_path(u32 segment_count)
|
||||
ErrorOr<DeprecatedPath> read_path(u32 segment_count)
|
||||
{
|
||||
Path path;
|
||||
DeprecatedPath path;
|
||||
auto segment_lengths = TRY(FixedArray<u32>::create(segment_count));
|
||||
for (auto& command_count : segment_lengths) {
|
||||
command_count = TRY(read_var_uint()) + 1;
|
||||
|
|
@ -367,8 +367,8 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
|||
auto color_table = TRY(decode_color_table(stream, header.color_encoding, header.color_count));
|
||||
TinyVGReader reader { stream, header, color_table.span() };
|
||||
|
||||
auto rectangle_to_path = [](FloatRect const& rect) -> Path {
|
||||
Path path;
|
||||
auto rectangle_to_path = [](FloatRect const& rect) -> DeprecatedPath {
|
||||
DeprecatedPath path;
|
||||
path.move_to({ rect.x(), rect.y() });
|
||||
path.line_to({ rect.x() + rect.width(), rect.y() });
|
||||
path.line_to({ rect.x() + rect.width(), rect.y() + rect.height() });
|
||||
|
|
@ -390,7 +390,7 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
|||
break;
|
||||
case Command::FillPolygon: {
|
||||
auto header = TRY(reader.read_fill_command_header(style_type));
|
||||
Path polygon;
|
||||
DeprecatedPath polygon;
|
||||
polygon.move_to(TRY(reader.read_point()));
|
||||
for (u32 i = 0; i < header.count - 1; i++)
|
||||
polygon.line_to(TRY(reader.read_point()));
|
||||
|
|
@ -413,7 +413,7 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
|||
}
|
||||
case Command::DrawLines: {
|
||||
auto header = TRY(reader.read_draw_command_header(style_type));
|
||||
Path path;
|
||||
DeprecatedPath path;
|
||||
for (u32 i = 0; i < header.count; i++) {
|
||||
auto line = TRY(reader.read_line());
|
||||
path.move_to(line.a());
|
||||
|
|
@ -425,7 +425,7 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
|||
case Command::DrawLineStrip:
|
||||
case Command::DrawLineLoop: {
|
||||
auto header = TRY(reader.read_draw_command_header(style_type));
|
||||
Path path;
|
||||
DeprecatedPath path;
|
||||
path.move_to(TRY(reader.read_point()));
|
||||
for (u32 i = 0; i < header.count - 1; i++)
|
||||
path.line_to(TRY(reader.read_point()));
|
||||
|
|
@ -442,7 +442,7 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
|||
}
|
||||
case Command::OutlineFillPolygon: {
|
||||
auto header = TRY(reader.read_outline_fill_command_header(style_type));
|
||||
Path polygon;
|
||||
DeprecatedPath polygon;
|
||||
polygon.move_to(TRY(reader.read_point()));
|
||||
for (u32 i = 0; i < header.count - 1; i++)
|
||||
polygon.line_to(TRY(reader.read_point()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue