Lines Matching refs:CanvasKit
8 CanvasKit.onRuntimeInitialized = function() {
11 _scratchColor = CanvasKit.Malloc(Float32Array, 4); // 4 color scalars.
14 _scratch4x4Matrix = CanvasKit.Malloc(Float32Array, 16); // 16 matrix scalars.
17 _scratch3x3Matrix = CanvasKit.Malloc(Float32Array, 9); // 9 matrix scalars.
20 _scratchRRect = CanvasKit.Malloc(Float32Array, 12); // 4 scalars for rrect, 8 for radii.
23 _scratchRRect2 = CanvasKit.Malloc(Float32Array, 12); // 4 scalars for rrect, 8 for radii.
26 _scratchFourFloatsA = CanvasKit.Malloc(Float32Array, 4);
29 _scratchFourFloatsB = CanvasKit.Malloc(Float32Array, 4);
32 _scratchThreeFloatsA = CanvasKit.Malloc(Float32Array, 3); // 3 floats to represent SkVector3
35 _scratchThreeFloatsB = CanvasKit.Malloc(Float32Array, 3); // 3 floats to represent SkVector3
38 _scratchIRect = CanvasKit.Malloc(Int32Array, 4);
43 CanvasKit.ColorSpace.SRGB = CanvasKit.ColorSpace._MakeSRGB();
44 CanvasKit.ColorSpace.DISPLAY_P3 = CanvasKit.ColorSpace._MakeDisplayP3();
45 CanvasKit.ColorSpace.ADOBE_RGB = CanvasKit.ColorSpace._MakeAdobeRGB();
48 CanvasKit['GlyphRunFlags'] = { variable
49 'IsWhiteSpace': CanvasKit['_GlyphRunFlags_isWhiteSpace'],
52 CanvasKit.Path.MakeFromCmds = function(cmds) {
54 var path = CanvasKit.Path._MakeFromCmds(ptrLen[0], ptrLen[1]);
55 CanvasKit._free(ptrLen[0]);
60 CanvasKit.Path.MakeFromVerbsPointsWeights = function(verbs, pts, weights) {
65 var path = CanvasKit.Path._MakeFromVerbsPointsWeights(
73 CanvasKit.Path.prototype.addArc = function(oval, startAngle, sweepAngle) {
81 CanvasKit.Path.prototype.addOval = function(oval, isCCW, startIndex) {
91 CanvasKit.Path.prototype.addPath = function() {
136 CanvasKit.Path.prototype.addPoly = function(points, close) {
143 CanvasKit.Path.prototype.addRect = function(rect, isCCW) {
149 CanvasKit.Path.prototype.addRRect = function(rrect, isCCW) {
156 CanvasKit.Path.prototype.addVerbsPointsWeights = function(verbs, points, weights) {
168 CanvasKit.Path.prototype.arc = function(x, y, radius, startAngle, endAngle, ccw) {
171 var bounds = CanvasKit.LTRBRect(x-radius, y-radius, x+radius, y+radius);
173 var temp = new CanvasKit.Path();
184 CanvasKit.Path.prototype.arcToOval = function(oval, startAngle, sweepAngle, forceMoveTo) {
204 CanvasKit.Path.prototype.arcToRotated = function(rx, ry, xAxisRotate, useSmallArc, isCCW, x, y) {
222 CanvasKit.Path.prototype.arcToTangent = function(x1, y1, x2, y2, radius) {
227 CanvasKit.Path.prototype.close = function() {
232 CanvasKit.Path.prototype.conicTo = function(x1, y1, x2, y2, w) {
240 CanvasKit.Path.prototype.computeTightBounds = function(optionalOutputArray) {
250 CanvasKit.Path.prototype.cubicTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
255 CanvasKit.Path.prototype.dash = function(on, off, phase) {
265 CanvasKit.Path.prototype.getBounds = function(optionalOutputArray) {
275 CanvasKit.Path.prototype.lineTo = function(x, y) {
280 CanvasKit.Path.prototype.moveTo = function(x, y) {
285 CanvasKit.Path.prototype.offset = function(dx, dy) {
292 CanvasKit.Path.prototype.quadTo = function(cpx, cpy, x, y) {
297 CanvasKit.Path.prototype.rArcTo = function(rx, ry, xAxisRotate, useSmallArc, isCCW, dx, dy) {
302 CanvasKit.Path.prototype.rConicTo = function(dx1, dy1, dx2, dy2, w) {
308 CanvasKit.Path.prototype.rCubicTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
313 CanvasKit.Path.prototype.rLineTo = function(dx, dy) {
318 CanvasKit.Path.prototype.rMoveTo = function(dx, dy) {
324 CanvasKit.Path.prototype.rQuadTo = function(cpx, cpy, x, y) {
329 CanvasKit.Path.prototype.stroke = function(opts) {
334 opts['cap'] = opts['cap'] || CanvasKit.StrokeCap.Butt;
335 opts['join'] = opts['join'] || CanvasKit.StrokeJoin.Miter;
344 CanvasKit.Path.prototype.transform = function() {
364 CanvasKit.Path.prototype.trim = function(startT, stopT, isComplement) {
375 CanvasKit.Image.prototype.makeShaderCubic = function(xTileMode, yTileMode,
386 CanvasKit.Image.prototype.makeShaderOptions = function(xTileMode, yTileMode,
396 if (imageInfo['colorType'] === CanvasKit.ColorType.RGBA_F16) {
399 else if (imageInfo['colorType'] === CanvasKit.ColorType.RGBA_F32) {
408 pPtr = CanvasKit._malloc(pBytes);
414 CanvasKit._free(pPtr);
428 case CanvasKit.ColorType.RGBA_8888:
429 case CanvasKit.ColorType.RGBA_F16: // there is no half-float JS type, so we return raw bytes.
430 retVal = new Uint8Array(CanvasKit.HEAPU8.buffer, pPtr, pBytes).slice();
432 case CanvasKit.ColorType.RGBA_F32:
433 retVal = new Float32Array(CanvasKit.HEAPU8.buffer, pPtr, pBytes).slice();
441 CanvasKit._free(pPtr);
445 CanvasKit.Image.prototype.readPixels = function(srcX, srcY, imageInfo, destMallocObj,
451 CanvasKit.Canvas.prototype.clear = function(color4f) {
456 CanvasKit.Canvas.prototype.clipRRect = function(rrect, op, antialias) {
461 CanvasKit.Canvas.prototype.clipRect = function(rect, op, antialias) {
468 CanvasKit.Canvas.prototype.concat = function(matr) {
473 CanvasKit.Canvas.prototype.drawArc = function(oval, startAngle, sweepAngle, useCenter, paint) {
486 CanvasKit.Canvas.prototype.drawAtlas = function(atlas, srcRects, dstXforms, paint,
503 blendMode = CanvasKit.BlendMode.SrcOver;
543 let filter = CanvasKit.FilterMode.Linear;
544 let mipmap = CanvasKit.MipmapMode.None;
566 CanvasKit.Canvas.prototype.drawColor = function (color4f, mode) {
575 CanvasKit.Canvas.prototype.drawColorComponents = function (r, g, b, a, mode) {
584 CanvasKit.Canvas.prototype.drawDRRect = function(outer, inner, paint) {
590 CanvasKit.Canvas.prototype.drawGlyphs = function(glyphs, positions, x, y, font, paint) {
604 CanvasKit.Canvas.prototype.drawImageNine = function(img, center, dest, filter, paint) {
610 CanvasKit.Canvas.prototype.drawImageRect = function(img, src, dest, paint, fastSample) {
616 CanvasKit.Canvas.prototype.drawImageRectCubic = function(img, src, dest, B, C, paint) {
623 …CanvasKit.Canvas.prototype.drawImageRectOptions = function(img, src, dest, filter, mipmap, paint) {
630 CanvasKit.Canvas.prototype.drawOval = function(oval, paint) {
635 CanvasKit.Canvas.prototype.drawPatch = function(cubics, colors, texs, mode, paint) {
650 mode = CanvasKit.BlendMode.Modulate;
664 CanvasKit.Canvas.prototype.drawPoints = function(mode, points, paint) {
670 CanvasKit.Canvas.prototype.drawRRect = function(rrect, paint) {
675 CanvasKit.Canvas.prototype.drawRect = function(rect, paint) {
680 CanvasKit.Canvas.prototype.drawShadow = function(path, zPlaneParams, lightPos, lightRadius,
692 CanvasKit.getShadowLocalBounds = function(ctm, path, zPlaneParams, lightPos, lightRadius,
712 CanvasKit.Canvas.prototype.getLocalToDevice = function() {
720 CanvasKit.Canvas.prototype.findMarkedCTM = function(marker) {
730 CanvasKit.Canvas.prototype.getTotalMatrix = function() {
737 rv[i] = CanvasKit.HEAPF32[_scratch3x3MatrixPtr/4 + i]; // divide by 4 to "cast" to float.
742 CanvasKit.Canvas.prototype.readPixels = function(srcX, srcY, imageInfo, destMallocObj,
747 CanvasKit.Canvas.prototype.saveLayer = function(paint, boundsRect, backdrop, flags) {
755 CanvasKit.Canvas.prototype.writePixels = function(pixels, srcWidth, srcHeight,
762 alphaType = alphaType || CanvasKit.AlphaType.Unpremul;
763 colorType = colorType || CanvasKit.ColorType.RGBA_8888;
764 colorSpace = colorSpace || CanvasKit.ColorSpace.SRGB;
780 CanvasKit.ColorFilter.MakeBlend = function(color4f, mode) {
782 return CanvasKit.ColorFilter._MakeBlend(cPtr, mode);
786 CanvasKit.ColorFilter.MakeMatrix = function(colorMatrix) {
792 var m = CanvasKit.ColorFilter._makeMatrix(fptr);
797 CanvasKit.ContourMeasure.prototype.getPosTan = function(distance, optionalOutput) {
807 CanvasKit.ImageFilter.MakeMatrixTransform = function(matr, filterQuality, input) {
809 return CanvasKit.ImageFilter._MakeMatrixTransform(matrPtr, filterQuality, input);
812 CanvasKit.Paint.prototype.getColor = function() {
817 CanvasKit.Paint.prototype.setColor = function(color4f, colorSpace) {
827 CanvasKit.Paint.prototype.setColorComponents = function(r, g, b, a, colorSpace) {
834 CanvasKit.Path.prototype.getPoint = function(idx, optionalOutput) {
849 CanvasKit.PictureRecorder.prototype.beginRecording = function(bounds) {
854 CanvasKit.Surface.prototype.makeImageSnapshot = function(optionalBoundsRect) {
859 CanvasKit.Surface.prototype.requestAnimationFrame = function(callback, dirtyRect) {
865 CanvasKit.setCurrentContext(this._context);
879 CanvasKit.Surface.prototype.drawOnce = function(callback, dirtyRect) {
885 CanvasKit.setCurrentContext(this._context);
894 CanvasKit.PathEffect.MakeDash = function(intervals, phase) {
902 var dpe = CanvasKit.PathEffect._MakeDash(ptr, intervals.length, phase);
907 CanvasKit.Shader.MakeColor = function(color4f, colorSpace) {
910 return CanvasKit.Shader._MakeColor(cPtr, colorSpace);
914 CanvasKit.Shader.Blend = CanvasKit.Shader.MakeBlend;
915 CanvasKit.Shader.Color = CanvasKit.Shader.MakeColor;
916 CanvasKit.Shader.Lerp = CanvasKit.Shader.MakeLerp;
918 …CanvasKit.Shader.MakeLinearGradient = function(start, end, colors, pos, mode, localMatrix, flags, …
930 …var lgs = CanvasKit.Shader._MakeLinearGradient(_scratchFourFloatsAPtr, cPtrInfo.colorPtr, cPtrInfo…
938 …CanvasKit.Shader.MakeRadialGradient = function(center, radius, colors, pos, mode, localMatrix, fla…
945 var rgs = CanvasKit.Shader._MakeRadialGradient(center[0], center[1], radius, cPtrInfo.colorPtr,
954 …CanvasKit.Shader.MakeSweepGradient = function(cx, cy, colors, pos, mode, localMatrix, flags, start…
963 …var sgs = CanvasKit.Shader._MakeSweepGradient(cx, cy, cPtrInfo.colorPtr, cPtrInfo.colorType, posPt…
973 CanvasKit.Shader.MakeTwoPointConicalGradient = function(start, startRadius, end, endRadius,
986 var rgs = CanvasKit.Shader._MakeTwoPointConicalGradient(_scratchFourFloatsAPtr,
998 CanvasKit.Vertices.prototype.bounds = function(optionalOutputArray) {
1009 if (CanvasKit._extraInitializations) {
1010 CanvasKit._extraInitializations.forEach(function(init) {
1024 CanvasKit.computeTonalColors = function(tonalColors) {
1041 CanvasKit.LTRBRect = function(l, t, r, b) {
1045 CanvasKit.XYWHRect = function(x, y, w, h) {
1049 CanvasKit.LTRBiRect = function(l, t, r, b) {
1053 CanvasKit.XYWHiRect = function(x, y, w, h) {
1059 CanvasKit.RRectXY = function(rect, rx, ry) {
1070 CanvasKit.MakeAnimatedImageFromEncoded = function(data) {
1073 var iptr = CanvasKit._malloc(data.byteLength);
1074 CanvasKit.HEAPU8.set(data, iptr);
1075 var img = CanvasKit._decodeAnimatedImage(iptr, data.byteLength);
1084 CanvasKit.MakeImageFromEncoded = function(data) {
1087 var iptr = CanvasKit._malloc(data.byteLength);
1088 CanvasKit.HEAPU8.set(data, iptr);
1089 var img = CanvasKit._decodeImage(iptr, data.byteLength);
1104 CanvasKit.MakeImageFromCanvasImageSource = function(canvasImageSource) {
1119 return CanvasKit.MakeImage({
1122 'alphaType': CanvasKit.AlphaType.Unpremul,
1123 'colorType': CanvasKit.ColorType.RGBA_8888,
1124 'colorSpace': CanvasKit.ColorSpace.SRGB
1131 CanvasKit.MakeImage = function(info, pixels, bytesPerRow) {
1132 var pptr = CanvasKit._malloc(pixels.length);
1133 CanvasKit.HEAPU8.set(pixels, pptr); // We always want to copy the bytes into the WASM heap.
1135 return CanvasKit._MakeImage(info, pptr, pixels.length, bytesPerRow);
1143 CanvasKit.MakeVertices = function(mode, positions, textureCoordinates, colors,
1161 var builder = new CanvasKit._VerticesBuilder(mode, positions.length / 2, idxCount, flags);