2018-09-20 21:39:31 +00:00
|
|
|
/*
|
|
|
|
* This externs file prevents the Closure JS compiler from minifying away
|
|
|
|
* names of objects created by Emscripten.
|
|
|
|
* Basically, by defining empty objects and functions here, Closure will
|
|
|
|
* know not to rename them. This is needed because of our pre-js files,
|
|
|
|
* that is, the JS we hand-write to bundle into the output. That JS will be
|
|
|
|
* hit by the closure compiler and thus needs to know about what functions
|
|
|
|
* have special names and should not be minified.
|
|
|
|
*
|
|
|
|
* Emscripten does not support automatically generating an externs file, so we
|
|
|
|
* do it by hand. The general process is to write some JS code, and then put any
|
|
|
|
* calls to CanvasKit or related things in here. Running ./compile.sh and then
|
|
|
|
* looking at the minified results or running the Release trybot should
|
|
|
|
* verify nothing was missed. Optionally, looking directly at the minified
|
|
|
|
* pathkit.js can be useful when developing locally.
|
|
|
|
*
|
|
|
|
* Docs:
|
|
|
|
* https://github.com/cljsjs/packages/wiki/Creating-Externs
|
|
|
|
* https://github.com/google/closure-compiler/wiki/Types-in-the-Closure-Type-System
|
|
|
|
*
|
|
|
|
* Example externs:
|
|
|
|
* https://github.com/google/closure-compiler/tree/master/externs
|
|
|
|
*/
|
|
|
|
|
|
|
|
var CanvasKit = {
|
2020-03-05 15:27:14 +00:00
|
|
|
// public API (i.e. things we declare in the pre-js file or in the cpp bindings)
|
|
|
|
Color: function() {},
|
2020-03-26 13:27:48 +00:00
|
|
|
Color4f: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
/** @return {CanvasKit.SkRect} */
|
|
|
|
LTRBRect: function() {},
|
|
|
|
/** @return {CanvasKit.SkRect} */
|
|
|
|
XYWHRect: function() {},
|
|
|
|
/** @return {CanvasKit.SkRRect} */
|
|
|
|
RRectXY: function() {},
|
|
|
|
/** @return {ImageData} */
|
|
|
|
ImageData: function() {},
|
|
|
|
|
|
|
|
GetWebGLContext: function() {},
|
|
|
|
MakeBlurMaskFilter: function() {},
|
|
|
|
MakeCanvas: function() {},
|
|
|
|
MakeCanvasSurface: function() {},
|
|
|
|
MakeGrContext: function() {},
|
|
|
|
/** @return {CanvasKit.SkAnimatedImage} */
|
|
|
|
MakeAnimatedImageFromEncoded: function() {},
|
|
|
|
/** @return {CanvasKit.SkImage} */
|
|
|
|
MakeImage: function() {},
|
|
|
|
/** @return {CanvasKit.SkImage} */
|
|
|
|
MakeImageFromEncoded: function() {},
|
|
|
|
MakeOnScreenGLSurface: function() {},
|
|
|
|
MakePathFromCmds: function() {},
|
|
|
|
MakePathFromOp: function() {},
|
|
|
|
MakePathFromSVGString: function() {},
|
|
|
|
MakeRenderTarget: function() {},
|
|
|
|
MakeSkPicture: function() {},
|
|
|
|
MakeSWCanvasSurface: function() {},
|
|
|
|
MakeManagedAnimation: function() {},
|
|
|
|
MakeParticles: function() {},
|
|
|
|
MakeSkVertices: function() {},
|
|
|
|
MakeSurface: function() {},
|
|
|
|
MakeWebGLCanvasSurface: function() {},
|
|
|
|
/** @return {TypedArray} */
|
|
|
|
Malloc: function() {},
|
|
|
|
computeTonalColors: function() {},
|
|
|
|
currentContext: function() {},
|
|
|
|
getColorComponents: function() {},
|
|
|
|
getDecodeCacheLimitBytes: function() {},
|
|
|
|
getDecodeCacheUsageBytes: function() {},
|
|
|
|
getSkDataBytes: function() {},
|
|
|
|
multiplyByAlpha: function() {},
|
|
|
|
parseColorString: function() {},
|
|
|
|
setCurrentContext: function() {},
|
|
|
|
setDecodeCacheLimitBytes: function() {},
|
|
|
|
|
2020-05-14 18:50:54 +00:00
|
|
|
// Defined by emscripten.
|
|
|
|
createContext:function() {},
|
|
|
|
|
2020-03-05 15:27:14 +00:00
|
|
|
// private API (i.e. things declared in the bindings that we use
|
|
|
|
// in the pre-js file)
|
2020-05-04 20:46:17 +00:00
|
|
|
_computeTonalColors: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
_MakeImage: function() {},
|
|
|
|
_MakeLinearGradientShader: function() {},
|
|
|
|
_MakePathFromCmds: function() {},
|
|
|
|
_MakeRadialGradientShader: function() {},
|
2020-03-16 16:17:30 +00:00
|
|
|
_MakeSweepGradientShader: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
_MakeManagedAnimation: function() {},
|
|
|
|
_MakeParticles: function() {},
|
|
|
|
_MakeSkPicture: function() {},
|
|
|
|
_MakeSkVertices: function() {},
|
|
|
|
_MakeTwoPointConicalGradientShader: function() {},
|
|
|
|
_decodeAnimatedImage: function() {},
|
|
|
|
_decodeImage: function() {},
|
|
|
|
_drawShapedText: function() {},
|
|
|
|
_getRasterDirectSurface: function() {},
|
|
|
|
_getRasterN32PremulSurface: function() {},
|
|
|
|
|
|
|
|
// The testing object is meant to expose internal functions
|
|
|
|
// for more fine-grained testing, e.g. parseColor
|
|
|
|
_testing: {},
|
|
|
|
|
|
|
|
// Objects and properties on CanvasKit
|
|
|
|
|
|
|
|
GrContext: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
getResourceCacheLimitBytes: function() {},
|
|
|
|
getResourceCacheUsageBytes: function() {},
|
|
|
|
releaseResourcesAndAbandonContext: function() {},
|
|
|
|
setResourceCacheLimitBytes: function() {},
|
|
|
|
},
|
|
|
|
|
2020-05-04 20:46:17 +00:00
|
|
|
ManagedAnimation: {
|
|
|
|
prototype: {
|
|
|
|
setColor: function() {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-03-05 15:27:14 +00:00
|
|
|
Paragraph: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
didExceedMaxLines: function() {},
|
|
|
|
getAlphabeticBaseline: function() {},
|
|
|
|
getGlyphPositionAtCoordinate: function() {},
|
|
|
|
getHeight: function() {},
|
|
|
|
getIdeographicBaseline: function() {},
|
|
|
|
getLongestLine: function() {},
|
|
|
|
getMaxIntrinsicWidth: function() {},
|
|
|
|
getMaxWidth: function() {},
|
|
|
|
getMinIntrinsicWidth: function() {},
|
|
|
|
getWordBoundary: function() {},
|
|
|
|
layout: function() {},
|
|
|
|
|
|
|
|
// private API
|
|
|
|
/** @return {Float32Array} */
|
|
|
|
_getRectsForRange: function() {},
|
|
|
|
},
|
|
|
|
|
2020-05-04 20:46:17 +00:00
|
|
|
ParagraphBuilder: {
|
|
|
|
Make: function() {},
|
|
|
|
addText: function() {},
|
|
|
|
build: function() {},
|
|
|
|
pop: function() {},
|
|
|
|
|
|
|
|
prototype: {
|
|
|
|
pushStyle: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
// private API
|
|
|
|
_Make: function() {},
|
|
|
|
_pushStyle: function() {},
|
|
|
|
},
|
|
|
|
|
2020-03-05 15:27:14 +00:00
|
|
|
SkRuntimeEffect: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
Make: function() {},
|
|
|
|
|
|
|
|
// private API
|
|
|
|
_makeShader: function() {},
|
|
|
|
_makeShaderWithChildren: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
ParagraphStyle: function() {},
|
|
|
|
RSXFormBuilder: function() {},
|
|
|
|
SkColorBuilder: function() {},
|
|
|
|
SkRectBuilder: function() {},
|
|
|
|
|
|
|
|
ShapedText: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
getBounds: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkAnimatedImage: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
decodeNextFrame: function() {},
|
|
|
|
getFrameCount: function() {},
|
|
|
|
getRepetitionCount: function() {},
|
|
|
|
height: function() {},
|
|
|
|
reset: function() {},
|
|
|
|
width: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkCanvas: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
clipPath: function() {},
|
|
|
|
clipRRect: function() {},
|
|
|
|
clipRect: function() {},
|
|
|
|
drawAnimatedImage: function() {},
|
|
|
|
drawArc: function() {},
|
|
|
|
drawCircle: function() {},
|
|
|
|
drawDRRect: function() {},
|
|
|
|
drawImage: function() {},
|
|
|
|
drawImageNine: function() {},
|
|
|
|
drawImageRect: function() {},
|
|
|
|
drawLine: function() {},
|
|
|
|
drawOval: function() {},
|
|
|
|
drawPaint: function() {},
|
|
|
|
drawParagraph: function() {},
|
|
|
|
drawPath: function() {},
|
|
|
|
drawPicture: function() {},
|
|
|
|
drawRRect: function() {},
|
|
|
|
drawRect: function() {},
|
|
|
|
drawRoundRect: function() {},
|
|
|
|
drawText: function() {},
|
|
|
|
drawTextBlob: function() {},
|
|
|
|
drawVertices: function() {},
|
|
|
|
flush: function() {},
|
|
|
|
getSaveCount: function() {},
|
|
|
|
makeSurface: function() {},
|
2020-05-06 20:22:33 +00:00
|
|
|
markCTM: function() {},
|
|
|
|
findMarkedCTM: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
restore: function() {},
|
|
|
|
restoreToCount: function() {},
|
|
|
|
rotate: function() {},
|
|
|
|
save: function() {},
|
2020-03-16 18:08:32 +00:00
|
|
|
saveLayer: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
scale: function() {},
|
|
|
|
skew: function() {},
|
|
|
|
translate: function() {},
|
|
|
|
|
2020-05-04 20:46:17 +00:00
|
|
|
prototype: {
|
|
|
|
clear: function() {},
|
|
|
|
drawColor: function() {},
|
|
|
|
drawShadow: function() {},
|
|
|
|
},
|
|
|
|
|
2020-03-05 15:27:14 +00:00
|
|
|
// private API
|
2020-05-04 20:46:17 +00:00
|
|
|
_clear: function() {},
|
2020-04-02 19:24:15 +00:00
|
|
|
_concat: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
_drawAtlas: function() {},
|
2020-05-04 20:46:17 +00:00
|
|
|
_drawColor: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
_drawPoints: function() {},
|
2020-05-04 20:46:17 +00:00
|
|
|
_drawShadow: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
_drawSimpleText: function() {},
|
2020-04-06 17:52:15 +00:00
|
|
|
_getLocalToCamera: function() {},
|
|
|
|
_getLocalToDevice: function() {},
|
|
|
|
_getLocalToWorld: function() {},
|
2020-04-02 19:24:15 +00:00
|
|
|
_getTotalMatrix: function() {},
|
2020-05-06 20:22:33 +00:00
|
|
|
_findMarkedCTM: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
_readPixels: function() {},
|
|
|
|
_writePixels: function() {},
|
|
|
|
delete: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkColorFilter: {
|
|
|
|
// public API (from C++ bindings and JS interface)
|
|
|
|
MakeBlend: function() {},
|
|
|
|
MakeCompose: function() {},
|
|
|
|
MakeLerp: function() {},
|
|
|
|
MakeLinearToSRGBGamma: function() {},
|
|
|
|
MakeMatrix: function() {},
|
|
|
|
MakeSRGBToLinearGamma: function() {},
|
|
|
|
// private API (from C++ bindings)
|
2020-05-04 20:46:17 +00:00
|
|
|
_MakeBlend: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
_makeMatrix: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkColorMatrix: {
|
|
|
|
concat: function() {},
|
|
|
|
identity: function() {},
|
|
|
|
postTranslate: function() {},
|
|
|
|
rotated: function() {},
|
|
|
|
scaled: function() {},
|
|
|
|
},
|
|
|
|
|
2020-05-26 17:10:20 +00:00
|
|
|
SkColorSpace: {
|
|
|
|
Equals: function() {},
|
|
|
|
SRGB: {},
|
|
|
|
DISPLAY_P3: {},
|
|
|
|
ADOBE_RGB: {},
|
|
|
|
// private API (from C++ bindings)
|
|
|
|
_MakeSRGB: function() {},
|
|
|
|
_MakeDisplayP3: function() {},
|
|
|
|
_MakeAdobeRGB: function() {},
|
|
|
|
},
|
|
|
|
|
2020-03-05 15:27:14 +00:00
|
|
|
SkContourMeasureIter: {
|
|
|
|
next: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkContourMeasure: {
|
|
|
|
getPosTan: function() {},
|
|
|
|
getSegment: function() {},
|
|
|
|
isClosed: function() {},
|
|
|
|
length: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkFont: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
getScaleX: function() {},
|
|
|
|
getSize: function() {},
|
|
|
|
getSkewX: function() {},
|
|
|
|
getTypeface: function() {},
|
|
|
|
measureText: function() {},
|
|
|
|
setHinting: function() {},
|
|
|
|
setLinearMetrics: function() {},
|
|
|
|
setScaleX: function() {},
|
|
|
|
setSize: function() {},
|
|
|
|
setSkewX: function() {},
|
|
|
|
setSubpixel: function() {},
|
|
|
|
setTypeface: function() {},
|
|
|
|
// private API (from C++ bindings)
|
|
|
|
_getWidths: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkFontMgr: {
|
|
|
|
// public API (from C++ and JS bindings)
|
|
|
|
FromData: function() {},
|
|
|
|
RefDefault: function() {},
|
|
|
|
countFamilies: function() {},
|
|
|
|
getFamilyName: function() {},
|
|
|
|
|
|
|
|
// private API
|
|
|
|
_makeTypefaceFromData: function() {},
|
|
|
|
_fromData: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkImage: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
height: function() {},
|
|
|
|
width: function() {},
|
|
|
|
// private API
|
|
|
|
_encodeToData: function() {},
|
|
|
|
_encodeToDataWithFormat: function() {},
|
|
|
|
_makeShader: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkImageFilter: {
|
|
|
|
MakeBlur: function() {},
|
|
|
|
MakeColorFilter: function() {},
|
|
|
|
MakeCompose: function() {},
|
|
|
|
MakeMatrixTransform: function() {},
|
2020-04-02 19:24:15 +00:00
|
|
|
|
|
|
|
// private API
|
|
|
|
_MakeMatrixTransform: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// These are defined in interface.js
|
|
|
|
SkM44: {
|
|
|
|
identity: function() {},
|
|
|
|
invert: function() {},
|
|
|
|
multiply: function() {},
|
|
|
|
rotatedUnitSinCos: function() {},
|
|
|
|
rotated: function() {},
|
|
|
|
scaled: function() {},
|
|
|
|
translated: function() {},
|
|
|
|
lookat: function() {},
|
|
|
|
perspective: function() {},
|
|
|
|
rc: function() {},
|
|
|
|
transpose: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkMatrix: {
|
|
|
|
identity: function() {},
|
|
|
|
invert: function() {},
|
|
|
|
mapPoints: function() {},
|
|
|
|
multiply: function() {},
|
|
|
|
rotated: function() {},
|
|
|
|
scaled: function() {},
|
|
|
|
skewed: function() {},
|
|
|
|
translated: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkMaskFilter: {
|
|
|
|
MakeBlur: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkPaint: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
/** @return {CanvasKit.SkPaint} */
|
|
|
|
copy: function() {},
|
|
|
|
getBlendMode: function() {},
|
|
|
|
getColor: function() {},
|
|
|
|
getFilterQuality: function() {},
|
|
|
|
getStrokeCap: function() {},
|
|
|
|
getStrokeJoin: function() {},
|
|
|
|
getStrokeMiter: function() {},
|
|
|
|
getStrokeWidth: function() {},
|
|
|
|
setAntiAlias: function() {},
|
|
|
|
setBlendMode: function() {},
|
|
|
|
setFilterQuality: function() {},
|
|
|
|
setImageFilter: function() {},
|
|
|
|
setMaskFilter: function() {},
|
|
|
|
setPathEffect: function() {},
|
|
|
|
setShader: function() {},
|
|
|
|
setStrokeCap: function() {},
|
|
|
|
setStrokeJoin: function() {},
|
|
|
|
setStrokeMiter: function() {},
|
|
|
|
setStrokeWidth: function() {},
|
|
|
|
setStyle: function() {},
|
|
|
|
|
2020-05-04 20:46:17 +00:00
|
|
|
prototype: {
|
|
|
|
setColor: function() {},
|
|
|
|
},
|
|
|
|
|
2020-03-05 15:27:14 +00:00
|
|
|
// Private API
|
|
|
|
delete: function() {},
|
2020-05-04 20:46:17 +00:00
|
|
|
_getColor: function() {},
|
|
|
|
_setColor: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
SkPathEffect: {
|
2020-03-18 13:53:55 +00:00
|
|
|
MakeCorner: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
MakeDash: function() {},
|
2020-03-18 13:53:55 +00:00
|
|
|
MakeDiscrete: function() {},
|
|
|
|
|
|
|
|
// Private C++ API
|
|
|
|
_MakeDash: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
SkParticleEffect: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
draw: function() {},
|
|
|
|
getEffectUniform: function() {},
|
|
|
|
getEffectUniformCount: function() {},
|
|
|
|
getEffectUniformFloatCount: function() {},
|
|
|
|
getEffectUniformName: function() {},
|
|
|
|
getParticleUniformCount: function() {},
|
|
|
|
getParticleUniformFloatCount: function() {},
|
|
|
|
getParticleUniformName: function() {},
|
|
|
|
getParticleUniform: function() {},
|
|
|
|
setPosition: function() {},
|
|
|
|
setRate: function() {},
|
|
|
|
start: function() {},
|
|
|
|
update: function() {},
|
|
|
|
|
|
|
|
// private API (from C++ bindings)
|
|
|
|
_effectUniformPtr: function() {},
|
|
|
|
_particleUniformPtr: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkPath: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
computeTightBounds: function() {},
|
|
|
|
contains: function() {},
|
|
|
|
/** @return {CanvasKit.SkPath} */
|
|
|
|
copy: function() {},
|
|
|
|
countPoints: function() {},
|
|
|
|
equals: function() {},
|
|
|
|
getBounds: function() {},
|
|
|
|
getFillType: function() {},
|
|
|
|
getPoint: function() {},
|
|
|
|
isEmpty: function() {},
|
|
|
|
isVolatile: function() {},
|
|
|
|
reset: function() {},
|
|
|
|
rewind: function() {},
|
|
|
|
setFillType: function() {},
|
|
|
|
setIsVolatile: function() {},
|
|
|
|
toSVGString: function() {},
|
|
|
|
|
|
|
|
// private API
|
|
|
|
_addArc: function() {},
|
|
|
|
_addOval: function() {},
|
|
|
|
_addPath: function() {},
|
|
|
|
_addRect: function() {},
|
|
|
|
_addPoly: function() {},
|
|
|
|
_addRoundRect: function() {},
|
|
|
|
_arc: function() {},
|
|
|
|
_arcTo: function() {},
|
|
|
|
_close: function() {},
|
|
|
|
_conicTo: function() {},
|
|
|
|
_cubicTo: function() {},
|
|
|
|
_dash: function() {},
|
|
|
|
_lineTo: function() {},
|
|
|
|
_moveTo: function() {},
|
|
|
|
_op: function() {},
|
|
|
|
_quadTo: function() {},
|
|
|
|
_rArcTo: function() {},
|
|
|
|
_rConicTo: function() {},
|
|
|
|
_rCubicTo: function() {},
|
|
|
|
_rLineTo: function() {},
|
|
|
|
_rMoveTo: function() {},
|
|
|
|
_rQuadTo: function() {},
|
|
|
|
_rect: function() {},
|
|
|
|
_simplify: function() {},
|
|
|
|
_stroke: function() {},
|
|
|
|
_transform: function() {},
|
|
|
|
_trim: function() {},
|
|
|
|
delete: function() {},
|
|
|
|
dump: function() {},
|
|
|
|
dumpHex: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkPathMeasure: {
|
|
|
|
getLength: function() {},
|
|
|
|
getSegment: function() {},
|
|
|
|
getPosTan: function() {},
|
|
|
|
isClosed: function() {},
|
|
|
|
nextContour: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkPicture: {
|
|
|
|
serialize: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkPictureRecorder: {
|
|
|
|
beginRecording: function() {},
|
|
|
|
finishRecordingAsPicture: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkRect: {
|
|
|
|
fLeft: {},
|
|
|
|
fTop: {},
|
|
|
|
fRight: {},
|
|
|
|
fBottom: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkRRect: {
|
|
|
|
rect: {},
|
|
|
|
rx1: {},
|
|
|
|
ry1: {},
|
|
|
|
rx2: {},
|
|
|
|
ry2: {},
|
|
|
|
rx3: {},
|
|
|
|
ry3: {},
|
|
|
|
rx4: {},
|
|
|
|
ry4: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkShader: {
|
|
|
|
Blend: function() {},
|
|
|
|
Color: function() {},
|
|
|
|
Empty: function() {},
|
|
|
|
Lerp: function() {},
|
2020-03-09 14:50:43 +00:00
|
|
|
MakeLinearGradient: function() {},
|
|
|
|
MakeRadialGradient: function() {},
|
|
|
|
MakeTwoPointConicalGradient: function() {},
|
2020-03-16 16:17:30 +00:00
|
|
|
MakeSweepGradient: function() {},
|
2020-05-04 20:46:17 +00:00
|
|
|
|
|
|
|
// private API (from C++ bindings)
|
|
|
|
_Color: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
SkSurface: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
/** @return {CanvasKit.SkCanvas} */
|
|
|
|
getCanvas: function() {},
|
2020-05-26 17:10:20 +00:00
|
|
|
imageInfo: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
/** @return {CanvasKit.SkImage} */
|
|
|
|
makeImageSnapshot: function() {},
|
|
|
|
makeSurface: function() {},
|
2020-05-11 12:24:16 +00:00
|
|
|
reportBackendType: function() {},
|
2020-03-05 15:27:14 +00:00
|
|
|
grContext: {},
|
|
|
|
|
|
|
|
// private API
|
|
|
|
_flush: function() {},
|
|
|
|
_getRasterN32PremulSurface: function() {},
|
|
|
|
delete: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkTextBlob: {
|
|
|
|
// public API (both C++ and JS bindings)
|
|
|
|
MakeFromRSXform: function() {},
|
|
|
|
MakeFromText: function() {},
|
|
|
|
MakeOnPath: function() {},
|
|
|
|
// private API (from C++ bindings)
|
|
|
|
_MakeFromRSXform: function() {},
|
|
|
|
_MakeFromText: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
// These are defined in interface.js
|
|
|
|
SkVector: {
|
|
|
|
add: function() {},
|
|
|
|
sub: function() {},
|
|
|
|
dot: function() {},
|
|
|
|
cross: function() {},
|
|
|
|
normalize: function() {},
|
|
|
|
mulScalar: function() {},
|
|
|
|
length: function() {},
|
|
|
|
lengthSquared: function() {},
|
|
|
|
dist: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
SkVertices: {
|
|
|
|
// public API (from C++ bindings)
|
|
|
|
bounds: function() {},
|
|
|
|
mode: function() {},
|
|
|
|
uniqueID: function() {},
|
|
|
|
vertexCount: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
_SkVerticesBuilder: {
|
|
|
|
colors: function() {},
|
|
|
|
detach: function() {},
|
|
|
|
indices: function() {},
|
|
|
|
positions: function() {},
|
|
|
|
texCoords: function() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
TextStyle: function() {},
|
|
|
|
|
|
|
|
// Constants and Enums
|
|
|
|
gpu: {},
|
|
|
|
skottie: {},
|
|
|
|
|
|
|
|
TRANSPARENT: {},
|
2020-03-26 13:27:48 +00:00
|
|
|
BLACK: {},
|
|
|
|
WHITE: {},
|
2020-03-05 15:27:14 +00:00
|
|
|
RED: {},
|
2020-03-26 13:27:48 +00:00
|
|
|
GREEN: {},
|
2020-03-05 15:27:14 +00:00
|
|
|
BLUE: {},
|
|
|
|
YELLOW: {},
|
|
|
|
CYAN: {},
|
2020-03-26 13:27:48 +00:00
|
|
|
MAGENTA: {},
|
2020-03-05 15:27:14 +00:00
|
|
|
|
|
|
|
MOVE_VERB: {},
|
|
|
|
LINE_VERB: {},
|
|
|
|
QUAD_VERB: {},
|
|
|
|
CONIC_VERB: {},
|
|
|
|
CUBIC_VERB: {},
|
|
|
|
CLOSE_VERB: {},
|
|
|
|
|
|
|
|
NoDecoration: {},
|
|
|
|
UnderlineDecoration: {},
|
|
|
|
OverlineDecoration: {},
|
|
|
|
LineThroughDecoration: {},
|
|
|
|
|
|
|
|
SaveLayerInitWithPrevious: {},
|
|
|
|
SaveLayerF16ColorType: {},
|
|
|
|
|
|
|
|
Affinity: {
|
|
|
|
Upstream: {},
|
|
|
|
Downstream: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
AlphaType: {
|
|
|
|
Opaque: {},
|
|
|
|
Premul: {},
|
|
|
|
Unpremul: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
BlendMode: {
|
|
|
|
Clear: {},
|
|
|
|
Src: {},
|
|
|
|
Dst: {},
|
|
|
|
SrcOver: {},
|
|
|
|
DstOver: {},
|
|
|
|
SrcIn: {},
|
|
|
|
DstIn: {},
|
|
|
|
SrcOut: {},
|
|
|
|
DstOut: {},
|
|
|
|
SrcATop: {},
|
|
|
|
DstATop: {},
|
|
|
|
Xor: {},
|
|
|
|
Plus: {},
|
|
|
|
Modulate: {},
|
|
|
|
Screen: {},
|
|
|
|
Overlay: {},
|
|
|
|
Darken: {},
|
|
|
|
Lighten: {},
|
|
|
|
ColorDodge: {},
|
|
|
|
ColorBurn: {},
|
|
|
|
HardLight: {},
|
|
|
|
SoftLight: {},
|
|
|
|
Difference: {},
|
|
|
|
Exclusion: {},
|
|
|
|
Multiply: {},
|
|
|
|
Hue: {},
|
|
|
|
Saturation: {},
|
|
|
|
Color: {},
|
|
|
|
Luminosity: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
BlurStyle: {
|
|
|
|
Normal: {},
|
|
|
|
Solid: {},
|
|
|
|
Outer: {},
|
|
|
|
Inner: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
ClipOp: {
|
|
|
|
Difference: {},
|
|
|
|
Intersect: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
ColorType: {
|
|
|
|
Alpha_8: {},
|
|
|
|
RGB_565: {},
|
|
|
|
ARGB_4444: {},
|
|
|
|
RGBA_8888: {},
|
|
|
|
RGB_888x: {},
|
|
|
|
BGRA_8888: {},
|
|
|
|
RGBA_1010102: {},
|
|
|
|
RGB_101010x: {},
|
|
|
|
Gray_8: {},
|
|
|
|
RGBA_F16: {},
|
|
|
|
RGBA_F32: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
FillType: {
|
|
|
|
Winding: {},
|
|
|
|
EvenOdd: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
FilterQuality: {
|
|
|
|
None: {},
|
|
|
|
Low: {},
|
|
|
|
Medium: {},
|
|
|
|
High: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
FontSlant: {
|
|
|
|
Upright: {},
|
|
|
|
Italic: {},
|
|
|
|
Oblique: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
FontHinting: {
|
|
|
|
None: {},
|
|
|
|
Slight: {},
|
|
|
|
Normal: {},
|
|
|
|
Full: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
FontWeight: {
|
|
|
|
Invisible: {},
|
|
|
|
Thin: {},
|
|
|
|
ExtraLight: {},
|
|
|
|
Light: {},
|
|
|
|
Normal: {},
|
|
|
|
Medium: {},
|
|
|
|
SemiBold: {},
|
|
|
|
Bold: {},
|
|
|
|
ExtraBold: {},
|
|
|
|
Black: {},
|
|
|
|
ExtraBlack: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
FontWidth: {
|
|
|
|
UltraCondensed: {},
|
|
|
|
ExtraCondensed: {},
|
|
|
|
Condensed: {},
|
|
|
|
SemiCondensed: {},
|
|
|
|
Normal: {},
|
|
|
|
SemiExpanded: {},
|
|
|
|
Expanded: {},
|
|
|
|
ExtraExpanded: {},
|
|
|
|
UltraExpanded: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
ImageFormat: {
|
|
|
|
PNG: {},
|
|
|
|
JPEG: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
PaintStyle: {
|
|
|
|
Fill: {},
|
|
|
|
Stroke: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
PathOp: {
|
|
|
|
Difference: {},
|
|
|
|
Intersect: {},
|
|
|
|
Union: {},
|
|
|
|
XOR: {},
|
|
|
|
ReverseDifference: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
PointMode: {
|
|
|
|
Points: {},
|
|
|
|
Lines: {},
|
|
|
|
Polygon: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
RectHeightStyle: {
|
|
|
|
Tight: {},
|
|
|
|
Max: {},
|
|
|
|
IncludeLineSpacingMiddle: {},
|
|
|
|
IncludeLineSpacingTop: {},
|
|
|
|
IncludeLineSpacingBottom: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
RectWidthStyle: {
|
|
|
|
Tight: {},
|
|
|
|
Max: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
StrokeCap: {
|
|
|
|
Butt: {},
|
|
|
|
Round: {},
|
|
|
|
Square: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
StrokeJoin: {
|
|
|
|
Miter: {},
|
|
|
|
Round: {},
|
|
|
|
Bevel: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
TextAlign: {
|
|
|
|
Left: {},
|
|
|
|
Right: {},
|
|
|
|
Center: {},
|
|
|
|
Justify: {},
|
|
|
|
Start: {},
|
|
|
|
End: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
TextDirection: {
|
|
|
|
LTR: {},
|
|
|
|
RTL: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
TileMode: {
|
|
|
|
Clamp: {},
|
|
|
|
Repeat: {},
|
|
|
|
Mirror: {},
|
|
|
|
Decal: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
VertexMode: {
|
|
|
|
Triangles: {},
|
|
|
|
TrianglesStrip: {},
|
|
|
|
TriangleFan: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
// Things Enscriptem adds for us
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @type {Float32Array}
|
|
|
|
*/
|
|
|
|
HEAPF32: {},
|
|
|
|
/**
|
|
|
|
* @type {Float64Array}
|
|
|
|
*/
|
|
|
|
HEAPF64: {},
|
|
|
|
/**
|
|
|
|
* @type {Uint8Array}
|
|
|
|
*/
|
|
|
|
HEAPU8: {},
|
|
|
|
/**
|
|
|
|
* @type {Uint16Array}
|
|
|
|
*/
|
|
|
|
HEAPU16: {},
|
|
|
|
/**
|
|
|
|
* @type {Uint32Array}
|
|
|
|
*/
|
|
|
|
HEAPU32: {},
|
|
|
|
/**
|
|
|
|
* @type {Int8Array}
|
|
|
|
*/
|
|
|
|
HEAP8: {},
|
|
|
|
/**
|
|
|
|
* @type {Int16Array}
|
|
|
|
*/
|
|
|
|
HEAP16: {},
|
|
|
|
/**
|
|
|
|
* @type {Int32Array}
|
|
|
|
*/
|
|
|
|
HEAP32: {},
|
|
|
|
|
|
|
|
_malloc: function() {},
|
|
|
|
_free: function() {},
|
|
|
|
onRuntimeInitialized: function() {},
|
2018-10-19 18:34:34 +00:00
|
|
|
};
|
2018-09-20 21:39:31 +00:00
|
|
|
|
2018-10-19 18:34:34 +00:00
|
|
|
// Public API things that are newly declared in the JS should go here.
|
|
|
|
// It's not enough to declare them above, because closure can still erase them
|
|
|
|
// unless they go on the prototype.
|
2019-10-03 15:22:08 +00:00
|
|
|
CanvasKit.Paragraph.prototype.getRectsForRange = function() {};
|
|
|
|
|
2018-11-20 17:51:16 +00:00
|
|
|
CanvasKit.SkPath.prototype.addArc = function() {};
|
2019-08-26 19:48:09 +00:00
|
|
|
CanvasKit.SkPath.prototype.addOval = function() {};
|
2018-09-20 21:39:31 +00:00
|
|
|
CanvasKit.SkPath.prototype.addPath = function() {};
|
2019-11-11 15:06:08 +00:00
|
|
|
CanvasKit.SkPath.prototype.addPoly = function() {};
|
2018-11-20 17:51:16 +00:00
|
|
|
CanvasKit.SkPath.prototype.addRect = function() {};
|
2019-01-07 16:08:55 +00:00
|
|
|
CanvasKit.SkPath.prototype.addRoundRect = function() {};
|
2018-11-14 23:01:19 +00:00
|
|
|
CanvasKit.SkPath.prototype.arc = function() {};
|
2018-10-19 18:34:34 +00:00
|
|
|
CanvasKit.SkPath.prototype.arcTo = function() {};
|
2018-09-20 21:39:31 +00:00
|
|
|
CanvasKit.SkPath.prototype.close = function() {};
|
2018-10-19 18:34:34 +00:00
|
|
|
CanvasKit.SkPath.prototype.conicTo = function() {};
|
|
|
|
CanvasKit.SkPath.prototype.cubicTo = function() {};
|
2018-11-03 11:51:19 +00:00
|
|
|
CanvasKit.SkPath.prototype.dash = function() {};
|
2018-10-19 18:34:34 +00:00
|
|
|
CanvasKit.SkPath.prototype.lineTo = function() {};
|
|
|
|
CanvasKit.SkPath.prototype.moveTo = function() {};
|
2019-08-26 19:48:09 +00:00
|
|
|
CanvasKit.SkPath.prototype.offset = function() {};
|
2018-10-19 18:34:34 +00:00
|
|
|
CanvasKit.SkPath.prototype.op = function() {};
|
|
|
|
CanvasKit.SkPath.prototype.quadTo = function() {};
|
2019-11-01 18:36:52 +00:00
|
|
|
CanvasKit.SkPath.prototype.rArcTo = function() {};
|
|
|
|
CanvasKit.SkPath.prototype.rConicTo = function() {};
|
|
|
|
CanvasKit.SkPath.prototype.rCubicTo = function() {};
|
|
|
|
CanvasKit.SkPath.prototype.rLineTo = function() {};
|
|
|
|
CanvasKit.SkPath.prototype.rMoveTo = function() {};
|
|
|
|
CanvasKit.SkPath.prototype.rQuadTo = function() {};
|
2018-10-19 18:34:34 +00:00
|
|
|
CanvasKit.SkPath.prototype.rect = function() {};
|
2018-09-20 21:39:31 +00:00
|
|
|
CanvasKit.SkPath.prototype.simplify = function() {};
|
2018-11-03 11:51:19 +00:00
|
|
|
CanvasKit.SkPath.prototype.stroke = function() {};
|
2018-09-20 21:39:31 +00:00
|
|
|
CanvasKit.SkPath.prototype.transform = function() {};
|
2018-11-03 11:51:19 +00:00
|
|
|
CanvasKit.SkPath.prototype.trim = function() {};
|
2018-09-20 21:39:31 +00:00
|
|
|
|
2020-01-14 13:39:09 +00:00
|
|
|
CanvasKit.SkPicture.prototype.saveAsFile = function() {};
|
2019-04-05 17:00:01 +00:00
|
|
|
|
2018-10-17 11:57:18 +00:00
|
|
|
CanvasKit.SkSurface.prototype.dispose = function() {};
|
2019-03-19 13:34:37 +00:00
|
|
|
CanvasKit.SkSurface.prototype.flush = function() {};
|
|
|
|
CanvasKit.SkSurface.prototype.requestAnimationFrame = function() {};
|
2020-01-22 21:49:41 +00:00
|
|
|
CanvasKit.SkSurface.prototype.drawOnce = function() {};
|
2019-04-05 17:00:01 +00:00
|
|
|
CanvasKit.SkSurface.prototype.captureFrameAsSkPicture = function() {};
|
2018-10-11 12:51:55 +00:00
|
|
|
|
2018-11-14 23:01:19 +00:00
|
|
|
CanvasKit.SkImage.prototype.encodeToData = function() {};
|
2019-04-04 13:28:53 +00:00
|
|
|
CanvasKit.SkImage.prototype.makeShader = function() {};
|
2018-11-14 23:01:19 +00:00
|
|
|
|
2020-04-02 19:24:15 +00:00
|
|
|
CanvasKit.SkCanvas.prototype.concat = function() {};
|
2020-04-06 17:52:15 +00:00
|
|
|
CanvasKit.SkCanvas.prototype.concat44 = function() {}; // deprecated
|
2019-03-29 14:39:52 +00:00
|
|
|
CanvasKit.SkCanvas.prototype.drawAtlas = function() {};
|
2019-11-11 15:06:08 +00:00
|
|
|
CanvasKit.SkCanvas.prototype.drawPoints = function() {};
|
2019-01-14 13:36:08 +00:00
|
|
|
CanvasKit.SkCanvas.prototype.drawText = function() {};
|
2020-04-06 17:52:15 +00:00
|
|
|
CanvasKit.SkCanvas.prototype.getLocalToCamera = function() {};
|
|
|
|
CanvasKit.SkCanvas.prototype.getLocalToDevice = function() {};
|
|
|
|
CanvasKit.SkCanvas.prototype.getLocalToWorld = function() {};
|
2020-04-02 19:24:15 +00:00
|
|
|
CanvasKit.SkCanvas.prototype.getTotalMatrix = function() {};
|
2018-12-04 18:57:36 +00:00
|
|
|
/** @return {Uint8Array} */
|
|
|
|
CanvasKit.SkCanvas.prototype.readPixels = function() {};
|
|
|
|
CanvasKit.SkCanvas.prototype.writePixels = function() {};
|
|
|
|
|
2018-12-12 15:35:13 +00:00
|
|
|
CanvasKit.SkFontMgr.prototype.MakeTypefaceFromData = function() {};
|
|
|
|
|
2019-03-15 19:36:29 +00:00
|
|
|
CanvasKit.SkFont.prototype.getWidths = function() {};
|
|
|
|
|
|
|
|
CanvasKit.RSXFormBuilder.prototype.build = function() {};
|
|
|
|
CanvasKit.RSXFormBuilder.prototype.delete = function() {};
|
|
|
|
CanvasKit.RSXFormBuilder.prototype.push = function() {};
|
2019-03-29 14:39:52 +00:00
|
|
|
CanvasKit.RSXFormBuilder.prototype.set = function() {};
|
|
|
|
|
|
|
|
CanvasKit.SkColorBuilder.prototype.build = function() {};
|
|
|
|
CanvasKit.SkColorBuilder.prototype.delete = function() {};
|
|
|
|
CanvasKit.SkColorBuilder.prototype.push = function() {};
|
|
|
|
CanvasKit.SkColorBuilder.prototype.set = function() {};
|
2019-03-15 19:36:29 +00:00
|
|
|
|
2020-01-06 13:11:52 +00:00
|
|
|
CanvasKit.SkRuntimeEffect.prototype.makeShader = function() {};
|
2020-02-22 12:37:33 +00:00
|
|
|
CanvasKit.SkRuntimeEffect.prototype.makeShaderWithChildren = function() {};
|
2019-12-06 18:55:58 +00:00
|
|
|
|
2020-02-21 13:26:59 +00:00
|
|
|
CanvasKit.SkParticleEffect.prototype.effectUniforms = function() {};
|
|
|
|
CanvasKit.SkParticleEffect.prototype.particleUniforms = function() {};
|
|
|
|
|
2018-11-03 11:51:19 +00:00
|
|
|
// Define StrokeOpts object
|
|
|
|
var StrokeOpts = {};
|
|
|
|
StrokeOpts.prototype.width;
|
|
|
|
StrokeOpts.prototype.miter_limit;
|
|
|
|
StrokeOpts.prototype.cap;
|
|
|
|
StrokeOpts.prototype.join;
|
2018-12-07 18:03:08 +00:00
|
|
|
StrokeOpts.prototype.precision;
|
2018-11-03 11:51:19 +00:00
|
|
|
|
2018-11-29 20:07:02 +00:00
|
|
|
// Define everything created in the canvas2d spec here
|
2018-11-26 16:47:54 +00:00
|
|
|
var HTMLCanvas = {};
|
2018-12-03 17:31:04 +00:00
|
|
|
HTMLCanvas.prototype.decodeImage = function() {};
|
|
|
|
HTMLCanvas.prototype.dispose = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
HTMLCanvas.prototype.getContext = function() {};
|
2018-12-14 20:03:41 +00:00
|
|
|
HTMLCanvas.prototype.loadFont = function() {};
|
2018-12-17 21:01:36 +00:00
|
|
|
HTMLCanvas.prototype.makePath2D = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
HTMLCanvas.prototype.toDataURL = function() {};
|
|
|
|
|
|
|
|
var CanvasRenderingContext2D = {};
|
|
|
|
CanvasRenderingContext2D.prototype.addHitRegion = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.arc = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.arcTo = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.beginPath = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.bezierCurveTo = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.clearHitRegions = function() {};
|
2018-11-28 17:51:56 +00:00
|
|
|
CanvasRenderingContext2D.prototype.clearRect = function() {};
|
2018-11-29 20:07:02 +00:00
|
|
|
CanvasRenderingContext2D.prototype.clip = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.closePath = function() {};
|
2018-12-04 18:57:36 +00:00
|
|
|
CanvasRenderingContext2D.prototype.createImageData = function() {};
|
2018-11-29 20:07:02 +00:00
|
|
|
CanvasRenderingContext2D.prototype.createLinearGradient = function() {};
|
2018-12-07 13:29:52 +00:00
|
|
|
CanvasRenderingContext2D.prototype.createPattern = function() {};
|
2018-11-29 20:07:02 +00:00
|
|
|
CanvasRenderingContext2D.prototype.createRadialGradient = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.drawFocusIfNeeded = function() {};
|
2018-12-03 17:31:04 +00:00
|
|
|
CanvasRenderingContext2D.prototype.drawImage = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.ellipse = function() {};
|
2018-11-27 18:26:59 +00:00
|
|
|
CanvasRenderingContext2D.prototype.fill = function() {};
|
2018-11-28 17:51:56 +00:00
|
|
|
CanvasRenderingContext2D.prototype.fillRect = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.fillText = function() {};
|
2018-12-04 18:57:36 +00:00
|
|
|
CanvasRenderingContext2D.prototype.getImageData = function() {};
|
2018-11-28 17:51:56 +00:00
|
|
|
CanvasRenderingContext2D.prototype.getLineDash = function() {};
|
2018-12-07 18:03:08 +00:00
|
|
|
CanvasRenderingContext2D.prototype.isPointInPath = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.isPointInStroke = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.lineTo = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.measureText = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.moveTo = function() {};
|
2018-12-04 18:57:36 +00:00
|
|
|
CanvasRenderingContext2D.prototype.putImageData = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.quadraticCurveTo = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.rect = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.removeHitRegion = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.resetTransform = function() {};
|
2018-11-27 18:26:59 +00:00
|
|
|
CanvasRenderingContext2D.prototype.restore = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.rotate = function() {};
|
2018-11-27 18:26:59 +00:00
|
|
|
CanvasRenderingContext2D.prototype.save = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.scale = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.scrollPathIntoView = function() {};
|
2018-11-28 17:51:56 +00:00
|
|
|
CanvasRenderingContext2D.prototype.setLineDash = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.setTransform = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.stroke = function() {};
|
2018-11-28 17:51:56 +00:00
|
|
|
CanvasRenderingContext2D.prototype.strokeRect = function() {};
|
2018-11-26 16:47:54 +00:00
|
|
|
CanvasRenderingContext2D.prototype.strokeText = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.transform = function() {};
|
|
|
|
CanvasRenderingContext2D.prototype.translate = function() {};
|
|
|
|
|
2018-12-17 21:01:36 +00:00
|
|
|
var Path2D = {};
|
|
|
|
Path2D.prototype.addPath = function() {};
|
|
|
|
Path2D.prototype.arc = function() {};
|
|
|
|
Path2D.prototype.arcTo = function() {};
|
|
|
|
Path2D.prototype.bezierCurveTo = function() {};
|
|
|
|
Path2D.prototype.closePath = function() {};
|
|
|
|
Path2D.prototype.ellipse = function() {};
|
|
|
|
Path2D.prototype.lineTo = function() {};
|
|
|
|
Path2D.prototype.moveTo = function() {};
|
|
|
|
Path2D.prototype.quadraticCurveTo = function() {};
|
|
|
|
Path2D.prototype.rect = function() {};
|
|
|
|
|
2018-11-29 20:07:02 +00:00
|
|
|
var LinearCanvasGradient = {};
|
|
|
|
LinearCanvasGradient.prototype.addColorStop = function() {};
|
|
|
|
var RadialCanvasGradient = {};
|
|
|
|
RadialCanvasGradient.prototype.addColorStop = function() {};
|
2018-12-07 13:29:52 +00:00
|
|
|
var CanvasPattern = {};
|
|
|
|
CanvasPattern.prototype.setTransform = function() {};
|
2018-11-29 20:07:02 +00:00
|
|
|
|
2018-12-04 18:57:36 +00:00
|
|
|
var ImageData = {
|
2020-03-05 15:27:14 +00:00
|
|
|
/**
|
|
|
|
* @type {Uint8ClampedArray}
|
|
|
|
*/
|
|
|
|
data: {},
|
|
|
|
height: {},
|
|
|
|
width: {},
|
2018-12-04 18:57:36 +00:00
|
|
|
};
|
|
|
|
|
2018-12-07 13:29:52 +00:00
|
|
|
var DOMMatrix = {
|
2020-03-05 15:27:14 +00:00
|
|
|
a: {},
|
|
|
|
b: {},
|
|
|
|
c: {},
|
|
|
|
d: {},
|
|
|
|
e: {},
|
|
|
|
f: {},
|
2018-12-07 13:29:52 +00:00
|
|
|
};
|
|
|
|
|
2018-09-20 21:39:31 +00:00
|
|
|
// Not sure why this is needed - might be a bug in emsdk that this isn't properly declared.
|
2018-11-20 20:55:10 +00:00
|
|
|
function loadWebAssemblyModule() {};
|