mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibWeb: Extract CanvasText class from CRC2D
This commit is contained in:
parent
62b561e2e1
commit
7cf42ede68
Notes:
sideshowbarker
2024-07-17 08:17:07 +09:00
Author: https://github.com/AtkinsSJ
Commit: 7cf42ede68
Pull-request: https://github.com/SerenityOS/serenity/pull/14839
4 changed files with 44 additions and 10 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <LibWeb/HTML/Canvas/CanvasPath.h>
|
||||
#include <LibWeb/HTML/Canvas/CanvasRect.h>
|
||||
#include <LibWeb/HTML/Canvas/CanvasState.h>
|
||||
#include <LibWeb/HTML/Canvas/CanvasText.h>
|
||||
#include <LibWeb/HTML/Canvas/CanvasTransform.h>
|
||||
#include <LibWeb/HTML/CanvasGradient.h>
|
||||
#include <LibWeb/Layout/InlineNode.h>
|
||||
|
@ -40,7 +41,8 @@ class CanvasRenderingContext2D
|
|||
, public CanvasTransform<CanvasRenderingContext2D>
|
||||
, public CanvasFillStrokeStyles<CanvasRenderingContext2D>
|
||||
, public CanvasRect
|
||||
, public CanvasDrawPath {
|
||||
, public CanvasDrawPath
|
||||
, public CanvasText {
|
||||
|
||||
AK_MAKE_NONCOPYABLE(CanvasRenderingContext2D);
|
||||
AK_MAKE_NONMOVABLE(CanvasRenderingContext2D);
|
||||
|
@ -66,8 +68,8 @@ public:
|
|||
virtual void stroke() override;
|
||||
virtual void stroke(Path2D const& path) override;
|
||||
|
||||
void fill_text(String const&, float x, float y, Optional<double> max_width);
|
||||
void stroke_text(String const&, float x, float y, Optional<double> max_width);
|
||||
virtual void fill_text(String const&, float x, float y, Optional<double> max_width) override;
|
||||
virtual void stroke_text(String const&, float x, float y, Optional<double> max_width) override;
|
||||
|
||||
virtual void fill(String const& fill_rule) override;
|
||||
virtual void fill(Path2D& path, String const& fill_rule) override;
|
||||
|
@ -80,7 +82,7 @@ public:
|
|||
|
||||
NonnullRefPtr<HTMLCanvasElement> canvas_for_binding() const;
|
||||
|
||||
RefPtr<TextMetrics> measure_text(String const& text);
|
||||
virtual RefPtr<TextMetrics> measure_text(String const& text) override;
|
||||
|
||||
virtual void clip() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue