summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.idl
blob: 149a2334a8bb5ecd7a5e4f2c1d73d567bb130e97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#import <HTML/CanvasGradient.idl>
#import <HTML/CanvasPattern.idl>
#import <HTML/HTMLCanvasElement.idl>
#import <HTML/HTMLImageElement.idl>

// https://html.spec.whatwg.org/multipage/canvas.html#canvasfillstrokestyles
interface mixin CanvasFillStrokeStyles {
    attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle;
    attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle;
    CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
    CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
    CanvasGradient createConicGradient(double startAngle, double x, double y);
    // FIXME: 'image' should be a CanvasImageSource
    CanvasPattern? createPattern((HTMLImageElement or HTMLCanvasElement) image, [LegacyNullToEmptyString] DOMString repetition);
};