mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Add initial support for SVG <textPath>
This patch adds basic support for the SVG `<textPath>`, so it supports placing text along a path, but none of the extra attributes for controlling the layout of the text. This is enough to correctly display the MDN example.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 10:54:57 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/809c5b0b03 Pull-request: https://github.com/SerenityOS/serenity/pull/22347
23
Userland/Libraries/LibWeb/SVG/SVGTextPathElement.idl
Normal file
23
Userland/Libraries/LibWeb/SVG/SVGTextPathElement.idl
Normal file
@@ -0,0 +1,23 @@
|
||||
#import <SVG/SVGTextContentElement.idl>
|
||||
#import <SVG/SVGURIReference.idl>
|
||||
|
||||
// https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextPathElement
|
||||
[Exposed=Window]
|
||||
interface SVGTextPathElement : SVGTextContentElement {
|
||||
|
||||
// textPath Method Types
|
||||
const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0;
|
||||
const unsigned short TEXTPATH_METHODTYPE_ALIGN = 1;
|
||||
const unsigned short TEXTPATH_METHODTYPE_STRETCH = 2;
|
||||
|
||||
// textPath Spacing Types
|
||||
const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
|
||||
const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1;
|
||||
const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2;
|
||||
|
||||
// FIXME: [SameObject] readonly attribute SVGAnimatedLength startOffset;
|
||||
// FIXME: [SameObject] readonly attribute SVGAnimatedEnumeration method;
|
||||
// FIXME: [SameObject] readonly attribute SVGAnimatedEnumeration spacing;
|
||||
};
|
||||
|
||||
SVGTextPathElement includes SVGURIReference;
|
||||
Reference in New Issue
Block a user