OffscreenCanvasRenderingContext2D
Generated.swift:13232class OffscreenCanvasRenderingContext2D
class OffscreenCanvasRenderingContext2D
import DOM
protocol CanvasCompositing : JSBridgedClass
protocol CanvasDrawImage : JSBridgedClass
protocol CanvasDrawPath : JSBridgedClass
protocol CanvasFillStrokeStyles : JSBridgedClass
protocol CanvasFilters : JSBridgedClass
protocol CanvasImageData : JSBridgedClass
protocol CanvasImageSmoothing : JSBridgedClass
protocol CanvasPath : JSBridgedClass
protocol CanvasPathDrawingStyles : JSBridgedClass
protocol CanvasRect : JSBridgedClass
protocol CanvasShadowStyles : JSBridgedClass
protocol CanvasState : JSBridgedClass
protocol CanvasText : JSBridgedClass
protocol CanvasTextDrawingStyles : JSBridgedClass
protocol CanvasTransform : JSBridgedClass
protocol ConstructibleFromJSValue
Types conforming to this protocol can be constructed from JSValue
.
protocol ConvertibleToJSValue
Objects that can be converted to a JavaScript value, preferably in a lossless manner.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Escapable
protocol JSBridgedClass : JSBridgedType
Conform to this protocol when your Swift class wraps a JavaScript class.
protocol JSBridgedType : ConstructibleFromJSValue, ConvertibleToJSValue, CustomStringConvertible
Use this protocol when your type has no single JavaScript class. For example, a union type of multiple classes or primitive values.
protocol OffscreenRenderingContext : ConstructibleFromJSValue, ConvertibleToJSValue
required init(unsafelyWrapping jsObject: JSObject)
static var contextID: JSString { get }
class var constructor: JSFunction? { get }
@ReadonlyAttribute var canvas: OffscreenCanvas { get }
let jsObject: JSObject
func commit()
init?(from value: JSValue)
init?(from object: JSObject)
static func construct(from value: JSValue) -> Self?
var description: String { get }
var direction: CanvasDirection { get nonmutating set }
var fillStyle: CanvasGradient_or_CanvasPattern_or_String { get nonmutating set }
var filter: String { get nonmutating set }
var font: String { get nonmutating set }
var fontKerning: CanvasFontKerning { get nonmutating set }
var fontStretch: CanvasFontStretch { get nonmutating set }
var fontVariantCaps: CanvasFontVariantCaps { get nonmutating set }
var globalAlpha: Double { get nonmutating set }
var globalCompositeOperation: String { get nonmutating set }
var imageSmoothingEnabled: Bool { get nonmutating set }
var imageSmoothingQuality: ImageSmoothingQuality { get nonmutating set }
var jsValue: JSValue { get }
var letterSpacing: String { get nonmutating set }
var lineCap: CanvasLineCap { get nonmutating set }
var lineDashOffset: Double { get nonmutating set }
var lineJoin: CanvasLineJoin { get nonmutating set }
var lineWidth: Double { get nonmutating set }
var miterLimit: Double { get nonmutating set }
var shadowBlur: Double { get nonmutating set }
var shadowColor: String { get nonmutating set }
var shadowOffsetX: Double { get nonmutating set }
var shadowOffsetY: Double { get nonmutating set }
var strokeStyle: CanvasGradient_or_CanvasPattern_or_String { get nonmutating set }
var textAlign: CanvasTextAlign { get nonmutating set }
var textBaseline: CanvasTextBaseline { get nonmutating set }
var textRendering: CanvasTextRendering { get nonmutating set }
var wordSpacing: String { get nonmutating set }
func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil)
func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double)
func beginPath()
func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double)
func clearRect(x: Double, y: Double, w: Double, h: Double)
func clip(fillRule: CanvasFillRule? = nil)
func clip(path: Path2D, fillRule: CanvasFillRule? = nil)
func closePath()
func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient
func createImageData(imagedata: ImageData) -> ImageData
func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData
func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient
func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern?
func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient
func drawImage(image: CanvasImageSource, dx: Double, dy: Double)
func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double)
func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double)
func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil)
func fill(fillRule: CanvasFillRule? = nil)
func fill(path: Path2D, fillRule: CanvasFillRule? = nil)
func fillRect(x: Double, y: Double, w: Double, h: Double)
func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil)
func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData
func getLineDash() -> [Double]
func getTransform() -> DOMMatrix
func isContextLost() -> Bool
func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool
func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool
func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool
func isPointInStroke(x: Double, y: Double) -> Bool
func lineTo(x: Double, y: Double)
func measureText(text: String) -> TextMetrics
func moveTo(x: Double, y: Double)
func putImageData(imagedata: ImageData, dx: Int32, dy: Int32)
func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32)
func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double)
func rect(x: Double, y: Double, w: Double, h: Double)
func reset()
func resetTransform()
func restore()
func rotate(angle: Double)
func roundRect(x: Double, y: Double, w: Double, h: Double, radii: DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double? = nil)
func save()
func scale(x: Double, y: Double)
func setLineDash(segments: [Double])
func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double)
func setTransform(transform: DOMMatrix2DInit? = nil)
func stroke()
func stroke(path: Path2D)
func strokeRect(x: Double, y: Double, w: Double, h: Double)
func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil)
func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double)
func translate(x: Double, y: Double)
func jsValue() -> JSValue