@rescript/webapi 0.1.0-alpha-b1d58f9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/package.json +61 -0
- package/rescript.json +557 -0
- package/src/animation/Animation.res +149 -0
- package/src/animation/AnimationEffect.res +71 -0
- package/src/animation/DocumentTimeline.res +8 -0
- package/src/canvas/Canvas.res +179 -0
- package/src/canvas/CanvasGradient.res +11 -0
- package/src/canvas/CanvasPattern.res +11 -0
- package/src/canvas/CanvasRenderingContext2D.res +868 -0
- package/src/canvas/CanvasTypes.res +452 -0
- package/src/canvas/FillStyle.res +25 -0
- package/src/canvas/HTMLCanvasElement.res +101 -0
- package/src/canvas/ImageBitmap.res +6 -0
- package/src/canvas/ImageBitmapRenderingContext.res +9 -0
- package/src/canvas/ImageData.res +17 -0
- package/src/canvas/OffscreenCanvas.res +87 -0
- package/src/canvas/Path2D.res +186 -0
- package/src/canvas/VideoColorSpace.res +11 -0
- package/src/canvas/VideoFrame.res +217 -0
- package/src/core/ArrayBufferTypedArrayOrDataView.res +4 -0
- package/src/core/DOM.res +1026 -0
- package/src/core/EventType.res +108 -0
- package/src/crypto/Crypto.res +11 -0
- package/src/crypto/SubtleCrypto.res +173 -0
- package/src/crypto/WebCryptoTypes.res +71 -0
- package/src/css-font-loading/BaseCSSFontLoading.res +24 -0
- package/src/css-font-loading/CssFontLoadingTypes.res +92 -0
- package/src/css-font-loading/FontFace.res +62 -0
- package/src/css-font-loading/FontFaceSet.res +38 -0
- package/src/cssom/CSSRuleList.res +5 -0
- package/src/cssom/CSSStyleDeclaration.res +1734 -0
- package/src/cssom/CSSStyleValue.res +17 -0
- package/src/cssom/MediaList.res +29 -0
- package/src/cssom/MediaQueryList.res +18 -0
- package/src/cssom/StylePropertyMap.res +56 -0
- package/src/cssom/StylePropertyMapReadOnly.res +22 -0
- package/src/cssom/StyleSheet.res +152 -0
- package/src/cssom/StyleSheetList.res +17 -0
- package/src/device/GamepadHapticActuator.res +16 -0
- package/src/device/GamepadTypes.res +86 -0
- package/src/device/Geolocation.res +31 -0
- package/src/device/GeolocationCoordinates.res +5 -0
- package/src/device/GeolocationPosition.res +5 -0
- package/src/device/GeolocationTypes.res +81 -0
- package/src/device/LockManager.res +26 -0
- package/src/device/ScreenOrientation.res +7 -0
- package/src/device/ScreenWakeLockTypes.res +26 -0
- package/src/device/WakeLock.res +8 -0
- package/src/device/WakeLockSentinel.res +7 -0
- package/src/device/WebLocksTypes.res +45 -0
- package/src/device/WebMIDI.res +7 -0
- package/src/device/WebMidiTypes.res +36 -0
- package/src/dom-nodes/AbstractRange.res +30 -0
- package/src/dom-nodes/Attr.res +101 -0
- package/src/dom-nodes/CDATASection.res +7 -0
- package/src/dom-nodes/CaretPosition.res +2 -0
- package/src/dom-nodes/CharacterData.res +199 -0
- package/src/dom-nodes/Comment.res +15 -0
- package/src/dom-nodes/DOMImplementation.res +131 -0
- package/src/dom-nodes/DOMTree.res +1653 -0
- package/src/dom-nodes/DocumentFragment.res +96 -0
- package/src/dom-nodes/Element.res +509 -0
- package/src/dom-nodes/ElementInternals.res +39 -0
- package/src/dom-nodes/HTML.res +11 -0
- package/src/dom-nodes/HTMLCollection.res +25 -0
- package/src/dom-nodes/NamedNodeMap.res +46 -0
- package/src/dom-nodes/Node.res +114 -0
- package/src/dom-nodes/NodeFilter.res +4 -0
- package/src/dom-nodes/NodeIterator.res +38 -0
- package/src/dom-nodes/NodeList.res +6 -0
- package/src/dom-nodes/ProcessingInstruction.res +15 -0
- package/src/dom-nodes/Range.res +156 -0
- package/src/dom-nodes/Selection.res +137 -0
- package/src/dom-nodes/ShadowRoot.res +23 -0
- package/src/dom-nodes/StaticRange.res +6 -0
- package/src/dom-nodes/Text.res +31 -0
- package/src/dom-nodes/TreeWalker.res +65 -0
- package/src/dom-platform/DOMException.res +7 -0
- package/src/dom-platform/DOMStringList.res +15 -0
- package/src/dom-platform/DOMStringMap.res +5 -0
- package/src/dom-platform/DOMTokenList.res +70 -0
- package/src/event/AbortController.res +9 -0
- package/src/event/AbortSignal.res +25 -0
- package/src/event/Event.res +76 -0
- package/src/event/EventTarget.res +91 -0
- package/src/event/ExtendableEvent.res +14 -0
- package/src/fetch/BodyInit.res +46 -0
- package/src/fetch/Fetch.res +12 -0
- package/src/fetch/FetchTypes.res +282 -0
- package/src/fetch/FormData.res +71 -0
- package/src/fetch/FormDataEntryValue.res +2 -0
- package/src/fetch/Headers.res +59 -0
- package/src/fetch/HeadersInit.res +16 -0
- package/src/fetch/Request.res +61 -0
- package/src/fetch/Response.res +127 -0
- package/src/file/BaseFileAndDirectoryEntries.res +72 -0
- package/src/file/Blob.res +48 -0
- package/src/file/File.res +15 -0
- package/src/file/FileAndDirectoryEntriesTypes.res +35 -0
- package/src/file/FileList.res +16 -0
- package/src/file/FileSystemDirectoryEntry.res +42 -0
- package/src/file/FileSystemDirectoryHandle.res +49 -0
- package/src/file/FileSystemDirectoryReader.res +9 -0
- package/src/file/FileSystemEntry.res +9 -0
- package/src/file/FileSystemFileHandle.res +25 -0
- package/src/file/FileSystemHandle.res +6 -0
- package/src/file/FileSystemWritableFileStream.res +65 -0
- package/src/file/FileTypes.res +225 -0
- package/src/file/ReadableStream.res +79 -0
- package/src/file/WritableStream.res +27 -0
- package/src/file/WritableStreamDefaultController.res +5 -0
- package/src/geometry/DOMMatrix.res +206 -0
- package/src/geometry/DOMMatrixReadOnly.res +140 -0
- package/src/geometry/DOMPoint.res +28 -0
- package/src/geometry/DOMPointReadOnly.res +22 -0
- package/src/geometry/DOMRect.res +22 -0
- package/src/geometry/DOMRectList.res +2 -0
- package/src/geometry/DOMRectReadOnly.res +19 -0
- package/src/html/HTMLAnchorElement.res +373 -0
- package/src/html/HTMLAreaElement.res +353 -0
- package/src/html/HTMLBRElement.res +9 -0
- package/src/html/HTMLBaseElement.res +20 -0
- package/src/html/HTMLBodyElement.res +9 -0
- package/src/html/HTMLButtonElement.res +98 -0
- package/src/html/HTMLDListElement.res +9 -0
- package/src/html/HTMLDataElement.res +14 -0
- package/src/html/HTMLDataListElement.res +14 -0
- package/src/html/HTMLDialogElement.res +40 -0
- package/src/html/HTMLDivElement.res +9 -0
- package/src/html/HTMLElement.res +108 -0
- package/src/html/HTMLEmbedElement.res +275 -0
- package/src/html/HTMLFieldSetElement.res +70 -0
- package/src/html/HTMLFormControlsCollection.res +21 -0
- package/src/html/HTMLFormElement.res +39 -0
- package/src/html/HTMLFrameSetElement.res +9 -0
- package/src/html/HTMLHRElement.res +9 -0
- package/src/html/HTMLHeadElement.res +256 -0
- package/src/html/HTMLHeadingElement.res +9 -0
- package/src/html/HTMLHtmlElement.res +9 -0
- package/src/html/HTMLIFrameElement.res +69 -0
- package/src/html/HTMLImageElement.res +349 -0
- package/src/html/HTMLInputElement.res +310 -0
- package/src/html/HTMLLIElement.res +9 -0
- package/src/html/HTMLLabelElement.res +25 -0
- package/src/html/HTMLLegendElement.res +14 -0
- package/src/html/HTMLLinkElement.res +69 -0
- package/src/html/HTMLMapElement.res +20 -0
- package/src/html/HTMLMenuElement.res +8 -0
- package/src/html/HTMLMetaElement.res +29 -0
- package/src/html/HTMLMeterElement.res +38 -0
- package/src/html/HTMLModElement.res +9 -0
- package/src/html/HTMLOListElement.res +24 -0
- package/src/html/HTMLObjectElement.res +89 -0
- package/src/html/HTMLOptGroupElement.res +19 -0
- package/src/html/HTMLOptionElement.res +49 -0
- package/src/html/HTMLOptionsCollection.res +35 -0
- package/src/html/HTMLOutputElement.res +73 -0
- package/src/html/HTMLParagraphElement.res +9 -0
- package/src/html/HTMLPictureElement.res +9 -0
- package/src/html/HTMLPreElement.res +9 -0
- package/src/html/HTMLProgressElement.res +29 -0
- package/src/html/HTMLQuoteElement.res +9 -0
- package/src/html/HTMLScriptElement.res +310 -0
- package/src/html/HTMLSelectElement.res +157 -0
- package/src/html/HTMLSlotElement.res +34 -0
- package/src/html/HTMLSourceElement.res +18 -0
- package/src/html/HTMLSpanElement.res +9 -0
- package/src/html/HTMLStyleElement.res +24 -0
- package/src/html/HTMLTableCaptionElement.res +9 -0
- package/src/html/HTMLTableCellElement.res +40 -0
- package/src/html/HTMLTableElement.res +100 -0
- package/src/html/HTMLTableRowElement.res +40 -0
- package/src/html/HTMLTableSectionElement.res +30 -0
- package/src/html/HTMLTemplateElement.res +31 -0
- package/src/html/HTMLTextAreaElement.res +177 -0
- package/src/html/HTMLTimeElement.res +14 -0
- package/src/html/HTMLTitleElement.res +15 -0
- package/src/html/HTMLUListElement.res +9 -0
- package/src/html/HTMLUnknownElement.res +9 -0
- package/src/media/BaseEncryptedMediaExtensions.res +97 -0
- package/src/media/DomHTMLMediaElement.res +206 -0
- package/src/media/EncryptedMediaExtensionsHTMLMediaElement.res +15 -0
- package/src/media/EncryptedMediaExtensionsTypes.res +43 -0
- package/src/media/HTMLAudioElement.res +9 -0
- package/src/media/HTMLTrackElement.res +14 -0
- package/src/media/HTMLVideoElement.res +78 -0
- package/src/media/MediaCapabilities.res +19 -0
- package/src/media/MediaCapabilitiesTypes.res +83 -0
- package/src/media/MediaCaptureAndStreamsTypes.res +197 -0
- package/src/media/MediaDeviceInfo.res +9 -0
- package/src/media/MediaDevices.res +40 -0
- package/src/media/MediaError.res +14 -0
- package/src/media/MediaKeySession.res +53 -0
- package/src/media/MediaKeyStatusMap.res +11 -0
- package/src/media/MediaKeySystemAccess.res +14 -0
- package/src/media/MediaKeys.res +35 -0
- package/src/media/MediaMetadata.res +10 -0
- package/src/media/MediaSession.res +25 -0
- package/src/media/MediaSessionTypes.res +85 -0
- package/src/media/MediaStream.res +89 -0
- package/src/media/MediaStreamTrack.res +51 -0
- package/src/media/PictureInPicture.res +7 -0
- package/src/media/PictureInPictureTypes.res +17 -0
- package/src/media/RemotePlayback.res +25 -0
- package/src/media/RemotePlaybackTypes.res +20 -0
- package/src/media/SpeechSynthesis.res +33 -0
- package/src/media/SpeechSynthesisUtterance.res +8 -0
- package/src/media/TextTrack.res +15 -0
- package/src/media/TextTrackCueList.res +9 -0
- package/src/media/TextTrackList.res +17 -0
- package/src/media/TimeRanges.res +29 -0
- package/src/media/VideoPlaybackQuality.res +18 -0
- package/src/media/WebSpeechTypes.res +83 -0
- package/src/media/WebVttTypes.res +123 -0
- package/src/messaging/ApplicationServerKey.res +2 -0
- package/src/messaging/ChannelMessagingTypes.res +12 -0
- package/src/messaging/CloseEvent.res +10 -0
- package/src/messaging/MessageEvent.res +43 -0
- package/src/messaging/MessagePort.res +38 -0
- package/src/messaging/Notification.res +46 -0
- package/src/messaging/NotificationTypes.res +107 -0
- package/src/messaging/PushEvent.res +3 -0
- package/src/messaging/PushManager.res +24 -0
- package/src/messaging/PushMessageData.res +15 -0
- package/src/messaging/PushSubscription.res +20 -0
- package/src/messaging/PushTypes.res +88 -0
- package/src/messaging/WebSocket.res +74 -0
- package/src/messaging/WebSocketsTypes.res +124 -0
- package/src/navigator/Clipboard.res +29 -0
- package/src/navigator/ClipboardItem.res +20 -0
- package/src/navigator/ClipboardTypes.res +31 -0
- package/src/navigator/CredentialManagementTypes.res +138 -0
- package/src/navigator/CredentialsContainer.res +33 -0
- package/src/navigator/Navigator.res +166 -0
- package/src/navigator/Permissions.res +10 -0
- package/src/navigator/PermissionsTypes.res +38 -0
- package/src/observers/IntersectionObserver.res +36 -0
- package/src/observers/IntersectionObserverRoot.res +23 -0
- package/src/observers/IntersectionObserverTypes.res +67 -0
- package/src/observers/MutationObserver.res +94 -0
- package/src/observers/ResizeObserver.res +30 -0
- package/src/observers/ResizeObserverTypes.res +56 -0
- package/src/performance/Performance.res +101 -0
- package/src/performance/PerformanceEntry.res +5 -0
- package/src/performance/PerformanceMark.res +16 -0
- package/src/performance/PerformanceTypes.res +86 -0
- package/src/storage/Cache.res +117 -0
- package/src/storage/CacheStorage.res +43 -0
- package/src/storage/CacheTypes.res +24 -0
- package/src/storage/IDBDatabase.res +54 -0
- package/src/storage/IDBFactory.res +34 -0
- package/src/storage/IDBIndex.res +83 -0
- package/src/storage/IDBObjectStore.res +183 -0
- package/src/storage/IDBTransaction.res +22 -0
- package/src/storage/IndexedDbTypes.res +213 -0
- package/src/storage/Storage.res +42 -0
- package/src/storage/StorageEvent.res +10 -0
- package/src/storage/StorageManager.res +24 -0
- package/src/storage/StorageTypes.res +11 -0
- package/src/storage/WebStorageTypes.res +57 -0
- package/src/svg/SVGElement.res +115 -0
- package/src/svg/SVGGraphicsElement.res +16 -0
- package/src/svg/SVGLength.res +9 -0
- package/src/ui-events/CompositionEvent.res +10 -0
- package/src/ui-events/DataTransfer.res +38 -0
- package/src/ui-events/DataTransferItem.res +21 -0
- package/src/ui-events/DataTransferItemList.res +34 -0
- package/src/ui-events/FocusEvent.res +10 -0
- package/src/ui-events/InputEvent.res +16 -0
- package/src/ui-events/KeyboardEvent.res +16 -0
- package/src/ui-events/MouseEvent.res +26 -0
- package/src/ui-events/PointerEvent.res +24 -0
- package/src/ui-events/Touch.res +5 -0
- package/src/ui-events/TouchEvent.res +10 -0
- package/src/ui-events/TouchList.res +5 -0
- package/src/ui-events/UIEvent.res +20 -0
- package/src/ui-events/UiEventsTypes.res +590 -0
- package/src/ui-events/WheelEvent.res +10 -0
- package/src/url/URL.res +38 -0
- package/src/url/URLSearchParams.res +104 -0
- package/src/url/UrlTypes.res +69 -0
- package/src/view-transitions/ViewTransition.res +5 -0
- package/src/view-transitions/ViewTransitionsTypes.res +22 -0
- package/src/web-audio/AnalyserNode.res +38 -0
- package/src/web-audio/AudioBuffer.res +33 -0
- package/src/web-audio/AudioBufferSourceNode.res +21 -0
- package/src/web-audio/AudioContext.res +59 -0
- package/src/web-audio/AudioDestinationNode.res +1 -0
- package/src/web-audio/AudioNode.res +76 -0
- package/src/web-audio/AudioParam.res +65 -0
- package/src/web-audio/AudioProcessingEvent.res +10 -0
- package/src/web-audio/AudioScheduledSourceNode.res +23 -0
- package/src/web-audio/AudioWorkletNode.res +11 -0
- package/src/web-audio/BaseAudioContext.res +141 -0
- package/src/web-audio/BiquadFilterNode.res +21 -0
- package/src/web-audio/ChannelMergerNode.res +10 -0
- package/src/web-audio/ChannelSplitterNode.res +10 -0
- package/src/web-audio/ConstantSourceNode.res +10 -0
- package/src/web-audio/ConvolverNode.res +10 -0
- package/src/web-audio/DelayNode.res +10 -0
- package/src/web-audio/DynamicsCompressorNode.res +10 -0
- package/src/web-audio/GainNode.res +10 -0
- package/src/web-audio/IIRFilterNode.res +21 -0
- package/src/web-audio/MediaElementAudioSourceNode.res +10 -0
- package/src/web-audio/MediaStreamAudioDestinationNode.res +10 -0
- package/src/web-audio/MediaStreamAudioSourceNode.res +10 -0
- package/src/web-audio/OfflineAudioCompletionEvent.res +10 -0
- package/src/web-audio/OfflineAudioContext.res +58 -0
- package/src/web-audio/OscillatorNode.res +17 -0
- package/src/web-audio/PannerNode.res +10 -0
- package/src/web-audio/PeriodicWave.res +8 -0
- package/src/web-audio/StereoPannerNode.res +10 -0
- package/src/web-audio/WaveShaperNode.res +10 -0
- package/src/web-audio/WebAudioTypes.res +1309 -0
- package/src/web-audio/Worklet.res +14 -0
- package/src/window/CustomElementRegistry.res +30 -0
- package/src/window/Document.res +470 -0
- package/src/window/DomGlobal.res +459 -0
- package/src/window/History.res +37 -0
- package/src/window/HistoryTypes.res +26 -0
- package/src/window/IdleDeadline.res +5 -0
- package/src/window/Location.res +108 -0
- package/src/window/VisualViewport.res +5 -0
- package/src/window/VisualViewportTypes.res +37 -0
- package/src/window/Window.res +556 -0
- package/src/window/XPathExpression.res +16 -0
- package/src/window/XPathResult.res +46 -0
- package/src/workers/Clients.res +39 -0
- package/src/workers/NavigationPreloadManager.res +26 -0
- package/src/workers/ServiceWorker.res +38 -0
- package/src/workers/ServiceWorkerContainer.res +34 -0
- package/src/workers/ServiceWorkerRegistration.res +32 -0
- package/src/workers/ServiceWorkerScope.res +12 -0
- package/src/workers/ServiceWorkerTypes.res +153 -0
- package/src/workers/SharedWorker.res +68 -0
- package/src/workers/SharedWorkerScope.res +29 -0
- package/src/workers/WebWorkersTypes.res +46 -0
- package/src/workers/Worker.res +48 -0
- package/src/workers/WorkerLocation.res +18 -0
|
@@ -0,0 +1,868 @@
|
|
|
1
|
+
/**
|
|
2
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save)
|
|
3
|
+
*/
|
|
4
|
+
@send
|
|
5
|
+
external save: DOM.canvasRenderingContext2D => unit = "save"
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore)
|
|
9
|
+
*/
|
|
10
|
+
@send
|
|
11
|
+
external restore: DOM.canvasRenderingContext2D => unit = "restore"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset)
|
|
15
|
+
*/
|
|
16
|
+
@send
|
|
17
|
+
external reset: DOM.canvasRenderingContext2D => unit = "reset"
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isContextLost)
|
|
21
|
+
*/
|
|
22
|
+
@send
|
|
23
|
+
external isContextLost: DOM.canvasRenderingContext2D => bool = "isContextLost"
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/scale)
|
|
27
|
+
*/
|
|
28
|
+
@send
|
|
29
|
+
external scale: (DOM.canvasRenderingContext2D, ~x: float, ~y: float) => unit = "scale"
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/rotate)
|
|
33
|
+
*/
|
|
34
|
+
@send
|
|
35
|
+
external rotate: (DOM.canvasRenderingContext2D, float) => unit = "rotate"
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/translate)
|
|
39
|
+
*/
|
|
40
|
+
@send
|
|
41
|
+
external translate: (DOM.canvasRenderingContext2D, ~x: float, ~y: float) => unit = "translate"
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/transform)
|
|
45
|
+
*/
|
|
46
|
+
@send
|
|
47
|
+
external transform: (
|
|
48
|
+
DOM.canvasRenderingContext2D,
|
|
49
|
+
~a: float,
|
|
50
|
+
~b: float,
|
|
51
|
+
~c: float,
|
|
52
|
+
~d: float,
|
|
53
|
+
~e: float,
|
|
54
|
+
~f: float,
|
|
55
|
+
) => unit = "transform"
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getTransform)
|
|
59
|
+
*/
|
|
60
|
+
@send
|
|
61
|
+
external getTransform: DOM.canvasRenderingContext2D => DOM.domMatrix = "getTransform"
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setTransform)
|
|
65
|
+
*/
|
|
66
|
+
@send
|
|
67
|
+
external setTransform: (
|
|
68
|
+
DOM.canvasRenderingContext2D,
|
|
69
|
+
~a: float,
|
|
70
|
+
~b: float,
|
|
71
|
+
~c: float,
|
|
72
|
+
~d: float,
|
|
73
|
+
~e: float,
|
|
74
|
+
~f: float,
|
|
75
|
+
) => unit = "setTransform"
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setTransform)
|
|
79
|
+
*/
|
|
80
|
+
@throws(JsExn) @send
|
|
81
|
+
external setTransform2: (DOM.canvasRenderingContext2D, ~transform: DOM.domMatrix2DInit=?) => unit =
|
|
82
|
+
"setTransform"
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/resetTransform)
|
|
86
|
+
*/
|
|
87
|
+
@send
|
|
88
|
+
external resetTransform: DOM.canvasRenderingContext2D => unit = "resetTransform"
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createLinearGradient)
|
|
92
|
+
*/
|
|
93
|
+
@throws(JsExn) @send
|
|
94
|
+
external createLinearGradient: (
|
|
95
|
+
DOM.canvasRenderingContext2D,
|
|
96
|
+
~x0: float,
|
|
97
|
+
~y0: float,
|
|
98
|
+
~x1: float,
|
|
99
|
+
~y1: float,
|
|
100
|
+
) => CanvasTypes.canvasGradient = "createLinearGradient"
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createRadialGradient)
|
|
104
|
+
*/
|
|
105
|
+
@throws(JsExn) @send
|
|
106
|
+
external createRadialGradient: (
|
|
107
|
+
DOM.canvasRenderingContext2D,
|
|
108
|
+
~x0: float,
|
|
109
|
+
~y0: float,
|
|
110
|
+
~r0: float,
|
|
111
|
+
~x1: float,
|
|
112
|
+
~y1: float,
|
|
113
|
+
~r1: float,
|
|
114
|
+
) => CanvasTypes.canvasGradient = "createRadialGradient"
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createConicGradient)
|
|
118
|
+
*/
|
|
119
|
+
@send
|
|
120
|
+
external createConicGradient: (
|
|
121
|
+
DOM.canvasRenderingContext2D,
|
|
122
|
+
~startAngle: float,
|
|
123
|
+
~x: float,
|
|
124
|
+
~y: float,
|
|
125
|
+
) => CanvasTypes.canvasGradient = "createConicGradient"
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
129
|
+
*/
|
|
130
|
+
@throws(JsExn) @send
|
|
131
|
+
external createPattern: (
|
|
132
|
+
DOM.canvasRenderingContext2D,
|
|
133
|
+
~image: HTMLImageElement.t,
|
|
134
|
+
~repetition: string,
|
|
135
|
+
) => Null.t<CanvasTypes.canvasPattern> = "createPattern"
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
139
|
+
*/
|
|
140
|
+
@throws(JsExn) @send
|
|
141
|
+
external createPattern2: (
|
|
142
|
+
DOM.canvasRenderingContext2D,
|
|
143
|
+
~image: SVGElement.svgImageElement,
|
|
144
|
+
~repetition: string,
|
|
145
|
+
) => Null.t<CanvasTypes.canvasPattern> = "createPattern"
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
149
|
+
*/
|
|
150
|
+
@throws(JsExn) @send
|
|
151
|
+
external createPattern3: (
|
|
152
|
+
DOM.canvasRenderingContext2D,
|
|
153
|
+
~image: HTMLVideoElement.t,
|
|
154
|
+
~repetition: string,
|
|
155
|
+
) => Null.t<CanvasTypes.canvasPattern> = "createPattern"
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
159
|
+
*/
|
|
160
|
+
@throws(JsExn) @send
|
|
161
|
+
external createPattern4: (
|
|
162
|
+
DOM.canvasRenderingContext2D,
|
|
163
|
+
~image: HTMLCanvasElement.t,
|
|
164
|
+
~repetition: string,
|
|
165
|
+
) => Null.t<CanvasTypes.canvasPattern> = "createPattern"
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
169
|
+
*/
|
|
170
|
+
@throws(JsExn) @send
|
|
171
|
+
external createPattern5: (
|
|
172
|
+
DOM.canvasRenderingContext2D,
|
|
173
|
+
~image: CanvasTypes.imageBitmap,
|
|
174
|
+
~repetition: string,
|
|
175
|
+
) => Null.t<CanvasTypes.canvasPattern> = "createPattern"
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
179
|
+
*/
|
|
180
|
+
@throws(JsExn) @send
|
|
181
|
+
external createPattern6: (
|
|
182
|
+
DOM.canvasRenderingContext2D,
|
|
183
|
+
~image: CanvasTypes.offscreenCanvas,
|
|
184
|
+
~repetition: string,
|
|
185
|
+
) => Null.t<CanvasTypes.canvasPattern> = "createPattern"
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
|
|
189
|
+
*/
|
|
190
|
+
@throws(JsExn) @send
|
|
191
|
+
external createPattern7: (
|
|
192
|
+
DOM.canvasRenderingContext2D,
|
|
193
|
+
~image: DOM.videoFrame,
|
|
194
|
+
~repetition: string,
|
|
195
|
+
) => Null.t<CanvasTypes.canvasPattern> = "createPattern"
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clearRect)
|
|
199
|
+
*/
|
|
200
|
+
@send
|
|
201
|
+
external clearRect: (
|
|
202
|
+
DOM.canvasRenderingContext2D,
|
|
203
|
+
~x: float,
|
|
204
|
+
~y: float,
|
|
205
|
+
~w: float,
|
|
206
|
+
~h: float,
|
|
207
|
+
) => unit = "clearRect"
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillRect)
|
|
211
|
+
*/
|
|
212
|
+
@send
|
|
213
|
+
external fillRect: (
|
|
214
|
+
DOM.canvasRenderingContext2D,
|
|
215
|
+
~x: float,
|
|
216
|
+
~y: float,
|
|
217
|
+
~w: float,
|
|
218
|
+
~h: float,
|
|
219
|
+
) => unit = "fillRect"
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeRect)
|
|
223
|
+
*/
|
|
224
|
+
@send
|
|
225
|
+
external strokeRect: (
|
|
226
|
+
DOM.canvasRenderingContext2D,
|
|
227
|
+
~x: float,
|
|
228
|
+
~y: float,
|
|
229
|
+
~w: float,
|
|
230
|
+
~h: float,
|
|
231
|
+
) => unit = "strokeRect"
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/beginPath)
|
|
235
|
+
*/
|
|
236
|
+
@send
|
|
237
|
+
external beginPath: DOM.canvasRenderingContext2D => unit = "beginPath"
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fill)
|
|
241
|
+
*/
|
|
242
|
+
@send
|
|
243
|
+
external fill: (DOM.canvasRenderingContext2D, ~fillRule: CanvasTypes.canvasFillRule=?) => unit =
|
|
244
|
+
"fill"
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fill)
|
|
248
|
+
*/
|
|
249
|
+
@send
|
|
250
|
+
external fill2: (
|
|
251
|
+
DOM.canvasRenderingContext2D,
|
|
252
|
+
~path: CanvasTypes.path2D,
|
|
253
|
+
~fillRule: CanvasTypes.canvasFillRule=?,
|
|
254
|
+
) => unit = "fill"
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke)
|
|
258
|
+
*/
|
|
259
|
+
@send
|
|
260
|
+
external stroke: DOM.canvasRenderingContext2D => unit = "stroke"
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke)
|
|
264
|
+
*/
|
|
265
|
+
@send
|
|
266
|
+
external stroke2: (DOM.canvasRenderingContext2D, CanvasTypes.path2D) => unit = "stroke"
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip)
|
|
270
|
+
*/
|
|
271
|
+
@send
|
|
272
|
+
external clip: (DOM.canvasRenderingContext2D, ~fillRule: CanvasTypes.canvasFillRule=?) => unit =
|
|
273
|
+
"clip"
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip)
|
|
277
|
+
*/
|
|
278
|
+
@send
|
|
279
|
+
external clip2: (
|
|
280
|
+
DOM.canvasRenderingContext2D,
|
|
281
|
+
~path: CanvasTypes.path2D,
|
|
282
|
+
~fillRule: CanvasTypes.canvasFillRule=?,
|
|
283
|
+
) => unit = "clip"
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath)
|
|
287
|
+
*/
|
|
288
|
+
@send
|
|
289
|
+
external isPointInPath: (
|
|
290
|
+
DOM.canvasRenderingContext2D,
|
|
291
|
+
~x: float,
|
|
292
|
+
~y: float,
|
|
293
|
+
~fillRule: CanvasTypes.canvasFillRule=?,
|
|
294
|
+
) => bool = "isPointInPath"
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath)
|
|
298
|
+
*/
|
|
299
|
+
@send
|
|
300
|
+
external isPointInPath2: (
|
|
301
|
+
DOM.canvasRenderingContext2D,
|
|
302
|
+
~path: CanvasTypes.path2D,
|
|
303
|
+
~x: float,
|
|
304
|
+
~y: float,
|
|
305
|
+
~fillRule: CanvasTypes.canvasFillRule=?,
|
|
306
|
+
) => bool = "isPointInPath"
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke)
|
|
310
|
+
*/
|
|
311
|
+
@send
|
|
312
|
+
external isPointInStroke: (DOM.canvasRenderingContext2D, ~x: float, ~y: float) => bool =
|
|
313
|
+
"isPointInStroke"
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke)
|
|
317
|
+
*/
|
|
318
|
+
@send
|
|
319
|
+
external isPointInStroke2: (
|
|
320
|
+
DOM.canvasRenderingContext2D,
|
|
321
|
+
~path: CanvasTypes.path2D,
|
|
322
|
+
~x: float,
|
|
323
|
+
~y: float,
|
|
324
|
+
) => bool = "isPointInStroke"
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded)
|
|
328
|
+
*/
|
|
329
|
+
@send
|
|
330
|
+
external drawFocusIfNeeded: (DOM.canvasRenderingContext2D, DOMTree.element) => unit =
|
|
331
|
+
"drawFocusIfNeeded"
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded)
|
|
335
|
+
*/
|
|
336
|
+
@send
|
|
337
|
+
external drawFocusIfNeeded2: (
|
|
338
|
+
DOM.canvasRenderingContext2D,
|
|
339
|
+
~path: CanvasTypes.path2D,
|
|
340
|
+
~element: DOMTree.element,
|
|
341
|
+
) => unit = "drawFocusIfNeeded"
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillText)
|
|
345
|
+
*/
|
|
346
|
+
@send
|
|
347
|
+
external fillText: (
|
|
348
|
+
DOM.canvasRenderingContext2D,
|
|
349
|
+
~text: string,
|
|
350
|
+
~x: float,
|
|
351
|
+
~y: float,
|
|
352
|
+
~maxWidth: float=?,
|
|
353
|
+
) => unit = "fillText"
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeText)
|
|
357
|
+
*/
|
|
358
|
+
@send
|
|
359
|
+
external strokeText: (
|
|
360
|
+
DOM.canvasRenderingContext2D,
|
|
361
|
+
~text: string,
|
|
362
|
+
~x: float,
|
|
363
|
+
~y: float,
|
|
364
|
+
~maxWidth: float=?,
|
|
365
|
+
) => unit = "strokeText"
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/measureText)
|
|
369
|
+
*/
|
|
370
|
+
@send
|
|
371
|
+
external measureText: (DOM.canvasRenderingContext2D, string) => CanvasTypes.textMetrics =
|
|
372
|
+
"measureText"
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
376
|
+
*/
|
|
377
|
+
@throws(JsExn) @send
|
|
378
|
+
external drawImage: (
|
|
379
|
+
DOM.canvasRenderingContext2D,
|
|
380
|
+
~image: HTMLImageElement.t,
|
|
381
|
+
~dx: float,
|
|
382
|
+
~dy: float,
|
|
383
|
+
) => unit = "drawImage"
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
387
|
+
*/
|
|
388
|
+
@throws(JsExn) @send
|
|
389
|
+
external drawImageWithSvg: (
|
|
390
|
+
DOM.canvasRenderingContext2D,
|
|
391
|
+
~image: SVGElement.svgImageElement,
|
|
392
|
+
~dx: float,
|
|
393
|
+
~dy: float,
|
|
394
|
+
) => unit = "drawImage"
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
398
|
+
*/
|
|
399
|
+
@throws(JsExn) @send
|
|
400
|
+
external drawImageWithVideo: (
|
|
401
|
+
DOM.canvasRenderingContext2D,
|
|
402
|
+
~image: HTMLVideoElement.t,
|
|
403
|
+
~dx: float,
|
|
404
|
+
~dy: float,
|
|
405
|
+
) => unit = "drawImage"
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
409
|
+
*/
|
|
410
|
+
@throws(JsExn) @send
|
|
411
|
+
external drawImageWithCanvas: (
|
|
412
|
+
DOM.canvasRenderingContext2D,
|
|
413
|
+
~image: HTMLCanvasElement.t,
|
|
414
|
+
~dx: float,
|
|
415
|
+
~dy: float,
|
|
416
|
+
) => unit = "drawImage"
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
420
|
+
*/
|
|
421
|
+
@throws(JsExn) @send
|
|
422
|
+
external drawImageWithImageBitmap: (
|
|
423
|
+
DOM.canvasRenderingContext2D,
|
|
424
|
+
~image: CanvasTypes.imageBitmap,
|
|
425
|
+
~dx: float,
|
|
426
|
+
~dy: float,
|
|
427
|
+
) => unit = "drawImage"
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
431
|
+
*/
|
|
432
|
+
@throws(JsExn) @send
|
|
433
|
+
external drawImageWithOffscreenCanvas: (
|
|
434
|
+
DOM.canvasRenderingContext2D,
|
|
435
|
+
~image: CanvasTypes.offscreenCanvas,
|
|
436
|
+
~dx: float,
|
|
437
|
+
~dy: float,
|
|
438
|
+
) => unit = "drawImage"
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
442
|
+
*/
|
|
443
|
+
@throws(JsExn) @send
|
|
444
|
+
external drawImageWithVideoFrame: (
|
|
445
|
+
DOM.canvasRenderingContext2D,
|
|
446
|
+
~image: DOM.videoFrame,
|
|
447
|
+
~dx: float,
|
|
448
|
+
~dy: float,
|
|
449
|
+
) => unit = "drawImage"
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
453
|
+
*/
|
|
454
|
+
@throws(JsExn) @send
|
|
455
|
+
external drawImageWithDimensions: (
|
|
456
|
+
DOM.canvasRenderingContext2D,
|
|
457
|
+
~image: HTMLImageElement.t,
|
|
458
|
+
~dx: float,
|
|
459
|
+
~dy: float,
|
|
460
|
+
~dw: float,
|
|
461
|
+
~dh: float,
|
|
462
|
+
) => unit = "drawImage"
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
466
|
+
*/
|
|
467
|
+
@throws(JsExn) @send
|
|
468
|
+
external drawImageWithSvgDimensions: (
|
|
469
|
+
DOM.canvasRenderingContext2D,
|
|
470
|
+
~image: SVGElement.svgImageElement,
|
|
471
|
+
~dx: float,
|
|
472
|
+
~dy: float,
|
|
473
|
+
~dw: float,
|
|
474
|
+
~dh: float,
|
|
475
|
+
) => unit = "drawImage"
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
479
|
+
*/
|
|
480
|
+
@throws(JsExn) @send
|
|
481
|
+
external drawImageWithVideoDimensions: (
|
|
482
|
+
DOM.canvasRenderingContext2D,
|
|
483
|
+
~image: HTMLVideoElement.t,
|
|
484
|
+
~dx: float,
|
|
485
|
+
~dy: float,
|
|
486
|
+
~dw: float,
|
|
487
|
+
~dh: float,
|
|
488
|
+
) => unit = "drawImage"
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
492
|
+
*/
|
|
493
|
+
@throws(JsExn) @send
|
|
494
|
+
external drawImageWithCanvasDimensions: (
|
|
495
|
+
DOM.canvasRenderingContext2D,
|
|
496
|
+
~image: HTMLCanvasElement.t,
|
|
497
|
+
~dx: float,
|
|
498
|
+
~dy: float,
|
|
499
|
+
~dw: float,
|
|
500
|
+
~dh: float,
|
|
501
|
+
) => unit = "drawImage"
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
505
|
+
*/
|
|
506
|
+
@throws(JsExn) @send
|
|
507
|
+
external drawImageWithImageBitmapDimensions: (
|
|
508
|
+
DOM.canvasRenderingContext2D,
|
|
509
|
+
~image: CanvasTypes.imageBitmap,
|
|
510
|
+
~dx: float,
|
|
511
|
+
~dy: float,
|
|
512
|
+
~dw: float,
|
|
513
|
+
~dh: float,
|
|
514
|
+
) => unit = "drawImage"
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
518
|
+
*/
|
|
519
|
+
@throws(JsExn) @send
|
|
520
|
+
external drawImageWithOffscreenCanvasDimensions: (
|
|
521
|
+
DOM.canvasRenderingContext2D,
|
|
522
|
+
~image: CanvasTypes.offscreenCanvas,
|
|
523
|
+
~dx: float,
|
|
524
|
+
~dy: float,
|
|
525
|
+
~dw: float,
|
|
526
|
+
~dh: float,
|
|
527
|
+
) => unit = "drawImage"
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
531
|
+
*/
|
|
532
|
+
@throws(JsExn) @send
|
|
533
|
+
external drawImageWithVideoFrameDimensions: (
|
|
534
|
+
DOM.canvasRenderingContext2D,
|
|
535
|
+
~image: DOM.videoFrame,
|
|
536
|
+
~dx: float,
|
|
537
|
+
~dy: float,
|
|
538
|
+
~dw: float,
|
|
539
|
+
~dh: float,
|
|
540
|
+
) => unit = "drawImage"
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
544
|
+
*/
|
|
545
|
+
@throws(JsExn) @send
|
|
546
|
+
external drawImageWithSubRectangle: (
|
|
547
|
+
DOM.canvasRenderingContext2D,
|
|
548
|
+
~image: HTMLImageElement.t,
|
|
549
|
+
~sx: float,
|
|
550
|
+
~sy: float,
|
|
551
|
+
~sw: float,
|
|
552
|
+
~sh: float,
|
|
553
|
+
~dx: float,
|
|
554
|
+
~dy: float,
|
|
555
|
+
~dw: float,
|
|
556
|
+
~dh: float,
|
|
557
|
+
) => unit = "drawImage"
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
561
|
+
*/
|
|
562
|
+
@throws(JsExn) @send
|
|
563
|
+
external drawImageWithSvgSubRectangle: (
|
|
564
|
+
DOM.canvasRenderingContext2D,
|
|
565
|
+
~image: SVGElement.svgImageElement,
|
|
566
|
+
~sx: float,
|
|
567
|
+
~sy: float,
|
|
568
|
+
~sw: float,
|
|
569
|
+
~sh: float,
|
|
570
|
+
~dx: float,
|
|
571
|
+
~dy: float,
|
|
572
|
+
~dw: float,
|
|
573
|
+
~dh: float,
|
|
574
|
+
) => unit = "drawImage"
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
578
|
+
*/
|
|
579
|
+
@throws(JsExn) @send
|
|
580
|
+
external drawImageWithVideoSubRectangle: (
|
|
581
|
+
DOM.canvasRenderingContext2D,
|
|
582
|
+
~image: HTMLVideoElement.t,
|
|
583
|
+
~sx: float,
|
|
584
|
+
~sy: float,
|
|
585
|
+
~sw: float,
|
|
586
|
+
~sh: float,
|
|
587
|
+
~dx: float,
|
|
588
|
+
~dy: float,
|
|
589
|
+
~dw: float,
|
|
590
|
+
~dh: float,
|
|
591
|
+
) => unit = "drawImage"
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
595
|
+
*/
|
|
596
|
+
@throws(JsExn) @send
|
|
597
|
+
external drawImageWithCanvasSubRectangle: (
|
|
598
|
+
DOM.canvasRenderingContext2D,
|
|
599
|
+
~image: HTMLCanvasElement.t,
|
|
600
|
+
~sx: float,
|
|
601
|
+
~sy: float,
|
|
602
|
+
~sw: float,
|
|
603
|
+
~sh: float,
|
|
604
|
+
~dx: float,
|
|
605
|
+
~dy: float,
|
|
606
|
+
~dw: float,
|
|
607
|
+
~dh: float,
|
|
608
|
+
) => unit = "drawImage"
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
612
|
+
*/
|
|
613
|
+
@throws(JsExn) @send
|
|
614
|
+
external drawImageWithImageBitmapSubRectangle: (
|
|
615
|
+
DOM.canvasRenderingContext2D,
|
|
616
|
+
~image: CanvasTypes.imageBitmap,
|
|
617
|
+
~sx: float,
|
|
618
|
+
~sy: float,
|
|
619
|
+
~sw: float,
|
|
620
|
+
~sh: float,
|
|
621
|
+
~dx: float,
|
|
622
|
+
~dy: float,
|
|
623
|
+
~dw: float,
|
|
624
|
+
~dh: float,
|
|
625
|
+
) => unit = "drawImage"
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
629
|
+
*/
|
|
630
|
+
@throws(JsExn) @send
|
|
631
|
+
external drawImageWithOffscreenCanvasSubRectangle: (
|
|
632
|
+
DOM.canvasRenderingContext2D,
|
|
633
|
+
~image: CanvasTypes.offscreenCanvas,
|
|
634
|
+
~sx: float,
|
|
635
|
+
~sy: float,
|
|
636
|
+
~sw: float,
|
|
637
|
+
~sh: float,
|
|
638
|
+
~dx: float,
|
|
639
|
+
~dy: float,
|
|
640
|
+
~dw: float,
|
|
641
|
+
~dh: float,
|
|
642
|
+
) => unit = "drawImage"
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage)
|
|
646
|
+
*/
|
|
647
|
+
@throws(JsExn) @send
|
|
648
|
+
external drawImageWithVideoFrameSubRectangle: (
|
|
649
|
+
DOM.canvasRenderingContext2D,
|
|
650
|
+
~image: DOM.videoFrame,
|
|
651
|
+
~sx: float,
|
|
652
|
+
~sy: float,
|
|
653
|
+
~sw: float,
|
|
654
|
+
~sh: float,
|
|
655
|
+
~dx: float,
|
|
656
|
+
~dy: float,
|
|
657
|
+
~dw: float,
|
|
658
|
+
~dh: float,
|
|
659
|
+
) => unit = "drawImage"
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createImageData)
|
|
663
|
+
*/
|
|
664
|
+
@throws(JsExn) @send
|
|
665
|
+
external createImageData: (
|
|
666
|
+
DOM.canvasRenderingContext2D,
|
|
667
|
+
~sw: int,
|
|
668
|
+
~sh: int,
|
|
669
|
+
~settings: DOM.imageDataSettings=?,
|
|
670
|
+
) => DOM.imageData = "createImageData"
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createImageData)
|
|
674
|
+
*/
|
|
675
|
+
@throws(JsExn) @send
|
|
676
|
+
external createImageData2: (DOM.canvasRenderingContext2D, DOM.imageData) => DOM.imageData =
|
|
677
|
+
"createImageData"
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getImageData)
|
|
681
|
+
*/
|
|
682
|
+
@throws(JsExn) @send
|
|
683
|
+
external getImageData: (
|
|
684
|
+
DOM.canvasRenderingContext2D,
|
|
685
|
+
~sx: int,
|
|
686
|
+
~sy: int,
|
|
687
|
+
~sw: int,
|
|
688
|
+
~sh: int,
|
|
689
|
+
~settings: DOM.imageDataSettings=?,
|
|
690
|
+
) => DOM.imageData = "getImageData"
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/putImageData)
|
|
694
|
+
*/
|
|
695
|
+
@throws(JsExn) @send
|
|
696
|
+
external putImageData: (
|
|
697
|
+
DOM.canvasRenderingContext2D,
|
|
698
|
+
~imagedata: DOM.imageData,
|
|
699
|
+
~dx: int,
|
|
700
|
+
~dy: int,
|
|
701
|
+
) => unit = "putImageData"
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/putImageData)
|
|
705
|
+
*/
|
|
706
|
+
@throws(JsExn) @send
|
|
707
|
+
external putImageData2: (
|
|
708
|
+
DOM.canvasRenderingContext2D,
|
|
709
|
+
~imagedata: DOM.imageData,
|
|
710
|
+
~dx: int,
|
|
711
|
+
~dy: int,
|
|
712
|
+
~dirtyX: int,
|
|
713
|
+
~dirtyY: int,
|
|
714
|
+
~dirtyWidth: int,
|
|
715
|
+
~dirtyHeight: int,
|
|
716
|
+
) => unit = "putImageData"
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash)
|
|
720
|
+
*/
|
|
721
|
+
@send
|
|
722
|
+
external setLineDash: (DOM.canvasRenderingContext2D, array<float>) => unit = "setLineDash"
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getLineDash)
|
|
726
|
+
*/
|
|
727
|
+
@send
|
|
728
|
+
external getLineDash: DOM.canvasRenderingContext2D => array<float> = "getLineDash"
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/closePath)
|
|
732
|
+
*/
|
|
733
|
+
@send
|
|
734
|
+
external closePath: DOM.canvasRenderingContext2D => unit = "closePath"
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/moveTo)
|
|
738
|
+
*/
|
|
739
|
+
@send
|
|
740
|
+
external moveTo: (DOM.canvasRenderingContext2D, ~x: float, ~y: float) => unit = "moveTo"
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineTo)
|
|
744
|
+
*/
|
|
745
|
+
@send
|
|
746
|
+
external lineTo: (DOM.canvasRenderingContext2D, ~x: float, ~y: float) => unit = "lineTo"
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/quadraticCurveTo)
|
|
750
|
+
*/
|
|
751
|
+
@send
|
|
752
|
+
external quadraticCurveTo: (
|
|
753
|
+
DOM.canvasRenderingContext2D,
|
|
754
|
+
~cpx: float,
|
|
755
|
+
~cpy: float,
|
|
756
|
+
~x: float,
|
|
757
|
+
~y: float,
|
|
758
|
+
) => unit = "quadraticCurveTo"
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo)
|
|
762
|
+
*/
|
|
763
|
+
@send
|
|
764
|
+
external bezierCurveTo: (
|
|
765
|
+
DOM.canvasRenderingContext2D,
|
|
766
|
+
~cp1x: float,
|
|
767
|
+
~cp1y: float,
|
|
768
|
+
~cp2x: float,
|
|
769
|
+
~cp2y: float,
|
|
770
|
+
~x: float,
|
|
771
|
+
~y: float,
|
|
772
|
+
) => unit = "bezierCurveTo"
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arcTo)
|
|
776
|
+
*/
|
|
777
|
+
@throws(JsExn) @send
|
|
778
|
+
external arcTo: (
|
|
779
|
+
DOM.canvasRenderingContext2D,
|
|
780
|
+
~x1: float,
|
|
781
|
+
~y1: float,
|
|
782
|
+
~x2: float,
|
|
783
|
+
~y2: float,
|
|
784
|
+
~radius: float,
|
|
785
|
+
) => unit = "arcTo"
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/rect)
|
|
789
|
+
*/
|
|
790
|
+
@send
|
|
791
|
+
external rect: (DOM.canvasRenderingContext2D, ~x: float, ~y: float, ~w: float, ~h: float) => unit =
|
|
792
|
+
"rect"
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
|
|
796
|
+
*/
|
|
797
|
+
@throws(JsExn) @send
|
|
798
|
+
external roundRect: (
|
|
799
|
+
DOM.canvasRenderingContext2D,
|
|
800
|
+
~x: float,
|
|
801
|
+
~y: float,
|
|
802
|
+
~w: float,
|
|
803
|
+
~h: float,
|
|
804
|
+
~radii_: array<float>=?,
|
|
805
|
+
) => unit = "roundRect"
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
|
|
809
|
+
*/
|
|
810
|
+
@throws(JsExn) @send
|
|
811
|
+
external roundRect2: (
|
|
812
|
+
DOM.canvasRenderingContext2D,
|
|
813
|
+
~x: float,
|
|
814
|
+
~y: float,
|
|
815
|
+
~w: float,
|
|
816
|
+
~h: float,
|
|
817
|
+
~radii_: array<float>=?,
|
|
818
|
+
) => unit = "roundRect"
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
|
|
822
|
+
*/
|
|
823
|
+
@throws(JsExn) @send
|
|
824
|
+
external roundRect3: (
|
|
825
|
+
DOM.canvasRenderingContext2D,
|
|
826
|
+
~x: float,
|
|
827
|
+
~y: float,
|
|
828
|
+
~w: float,
|
|
829
|
+
~h: float,
|
|
830
|
+
~radii_: array<float>=?,
|
|
831
|
+
) => unit = "roundRect"
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arc)
|
|
835
|
+
*/
|
|
836
|
+
@send
|
|
837
|
+
external arc: (
|
|
838
|
+
DOM.canvasRenderingContext2D,
|
|
839
|
+
~x: float,
|
|
840
|
+
~y: float,
|
|
841
|
+
~radius: float,
|
|
842
|
+
~startAngle: float,
|
|
843
|
+
~endAngle: float,
|
|
844
|
+
~counterclockwise: bool=?,
|
|
845
|
+
) => unit = "arc"
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/ellipse)
|
|
849
|
+
*/
|
|
850
|
+
@send
|
|
851
|
+
external ellipse: (
|
|
852
|
+
DOM.canvasRenderingContext2D,
|
|
853
|
+
~x: float,
|
|
854
|
+
~y: float,
|
|
855
|
+
~radiusX: float,
|
|
856
|
+
~radiusY: float,
|
|
857
|
+
~rotation: float,
|
|
858
|
+
~startAngle: float,
|
|
859
|
+
~endAngle: float,
|
|
860
|
+
~counterclockwise: bool=?,
|
|
861
|
+
) => unit = "ellipse"
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getContextAttributes)
|
|
865
|
+
*/
|
|
866
|
+
@send
|
|
867
|
+
external getContextAttributes: DOM.canvasRenderingContext2D => CanvasTypes.canvasRenderingContext2DSettings =
|
|
868
|
+
"getContextAttributes"
|