ladybird/Userland/Libraries/LibWeb/HTML/Canvas/CanvasPathDrawingStyles.idl
simonkrauter e9001da8d6 LibWeb: Initial support for dashed lines in Canvas
Implement setLineDash() and getLineDash() in CanvasPathDrawingStyles,
which write/read from the CanvasState object.
This doesn't implement the actual drawing of a dashed line, but at least
sites using the Chart.js library no longer fail with an exception.
Unfortunately the Painter classes don't support dashed/dotted lines
based on segments yet.
2024-06-25 09:47:17 +02:00

15 lines
659 B
Text

// 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;
undefined setLineDash(sequence<unrestricted double> segments);
sequence<unrestricted double> getLineDash();
[FIXME] attribute unrestricted double lineDashOffset;
};