Skip to content

Commit ed921b6

Browse files
LibGfx+LibWeb: Delete unused Line class and Rect methods
1 parent aa5b3ff commit ed921b6

File tree

8 files changed

+4
-597
lines changed

8 files changed

+4
-597
lines changed

Libraries/LibGfx/Forward.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ class GlyphRun;
1919
class ImageDecoder;
2020
struct FontPixelMetrics;
2121

22-
template<typename T>
23-
class Line;
24-
2522
class Painter;
2623
class PaintingSurface;
2724
class Palette;
@@ -46,9 +43,6 @@ class Rect;
4643
template<typename T>
4744
class Quad;
4845

49-
using IntLine = Line<int>;
50-
using FloatLine = Line<float>;
51-
5246
using IntRect = Rect<int>;
5347
using FloatRect = Rect<float>;
5448

Libraries/LibGfx/ImageFormats/PNGWriter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: BSD-2-Clause
55
*/
66

7+
#include <AK/ByteBuffer.h>
78
#include <AK/NonnullOwnPtr.h>
89
#include <AK/Vector.h>
910
#include <LibGfx/Bitmap.h>

Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <AK/MemoryStream.h>
1212
#include <AK/Variant.h>
1313
#include <LibGfx/ImageFormats/TinyVGLoader.h>
14-
#include <LibGfx/Line.h>
1514
#include <LibGfx/Painter.h>
1615
#include <LibGfx/Path.h>
1716
#include <LibGfx/Point.h>
@@ -249,11 +248,6 @@ class TinyVGReader {
249248
return FloatRect { TRY(read_unit()), TRY(read_unit()), TRY(read_unit()), TRY(read_unit()) };
250249
}
251250

252-
ErrorOr<FloatLine> read_line()
253-
{
254-
return FloatLine { TRY(read_point()), TRY(read_point()) };
255-
}
256-
257251
ErrorOr<Path> read_path(u32 segment_count)
258252
{
259253
Path path;
@@ -414,9 +408,8 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
414408
auto header = TRY(reader.read_draw_command_header(style_type));
415409
Path path;
416410
for (u32 i = 0; i < header.count; i++) {
417-
auto line = TRY(reader.read_line());
418-
path.move_to(line.a());
419-
path.line_to(line.b());
411+
path.move_to(TRY(reader.read_point()));
412+
path.line_to(TRY(reader.read_point()));
420413
}
421414
TRY(draw_commands.try_append(DrawCommand { move(path), {}, move(header.line_style), header.line_width }));
422415
break;

Libraries/LibGfx/Line.h

Lines changed: 0 additions & 199 deletions
This file was deleted.

0 commit comments

Comments
 (0)