ladybird/Userland/Libraries/LibWeb/HTML/Canvas/CanvasPathDrawingStyles.idl
Bastiaan van der Plaat 220e34b69d LibWeb: Add Canvas Context2D basic text align and text baseline support
Add the CanvasTextDrawingStyles mixin with the textAlign and
textBaseline attributes. Update fill_text in CanvasRenderingContext2D
to move the text rect by the text align and text baseline attributes.
Wrote a simple HTML example to showcase the new features.
2023-08-05 17:17:08 +02:00

16 lines
687 B
Plaintext

// https://html.spec.whatwg.org/multipage/canvas.html#canvaslinecap
enum CanvasLineCap { "butt", "round", "square" };
enum CanvasLineJoin { "round", "bevel", "miter" };
// https://html.spec.whatwg.org/multipage/canvas.html#canvaspathdrawingstyles
interface mixin CanvasPathDrawingStyles {
attribute unrestricted double lineWidth;
// FIXME: attribute CanvasLineCap lineCap;
// FIXME: attribute CanvasLineJoin lineJoin;
// FIXME: attribute unrestricted double miterLimit;
// FIXME: undefined setLineDash(sequence<unrestricted double> segments);
// FIXME: sequence<unrestricted double> getLineDash();
// FIXME: attribute unrestricted double lineDashOffset;
};