• Home
  • Raw
  • Download

Lines Matching refs:CanvasKit

4 (function(CanvasKit) {  argument
8 CanvasKit.onRuntimeInitialized = function() {
19 CanvasKit.SkMatrix = {};
26 CanvasKit.SkMatrix.identity = function() {
36 CanvasKit.SkMatrix.invert = function(m) {
41 return CanvasKit.SkMatrix.identity();
53 CanvasKit.SkMatrix.mapPoints = function(matrix, ptArr) {
71 CanvasKit.SkMatrix.multiply = function(m1, m2) {
87 CanvasKit.SkMatrix.rotated = function(radians, px, py) {
99 CanvasKit.SkMatrix.scaled = function(sx, sy, px, py) {
109 CanvasKit.SkMatrix.skewed = function(kx, ky, px, py) {
119 CanvasKit.SkMatrix.translated = function(dx, dy) {
127 CanvasKit.SkPath.prototype.addArc = function(oval, startAngle, sweepAngle) {
134 CanvasKit.SkPath.prototype.addPath = function() {
176 CanvasKit.SkPath.prototype.addRect = function() {
196 CanvasKit.SkPath.prototype.addRoundRect = function() {
218 var rptr = copy1dArray(radii, CanvasKit.HEAPF32);
227 CanvasKit._free(rptr);
231 CanvasKit.SkPath.prototype.arc = function(x, y, radius, startAngle, endAngle, ccw) {
234 var bounds = CanvasKit.LTRBRect(x-radius, y-radius, x+radius, y+radius);
236 var temp = new CanvasKit.SkPath();
243 CanvasKit.SkPath.prototype.arcTo = function() {
254 this._arcTo(CanvasKit.LTRBRect(args[0], args[1], args[2], args[3]),
263 CanvasKit.SkPath.prototype.close = function() {
268 CanvasKit.SkPath.prototype.conicTo = function(x1, y1, x2, y2, w) {
273 CanvasKit.SkPath.prototype.cubicTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
278 CanvasKit.SkPath.prototype.dash = function(on, off, phase) {
285 CanvasKit.SkPath.prototype.lineTo = function(x, y) {
290 CanvasKit.SkPath.prototype.moveTo = function(x, y) {
295 CanvasKit.SkPath.prototype.op = function(otherPath, op) {
302 CanvasKit.SkPath.prototype.quadTo = function(cpx, cpy, x, y) {
307 CanvasKit.SkPath.prototype.simplify = function() {
314 CanvasKit.SkPath.prototype.stroke = function(opts) {
323 opts.cap = opts.cap || CanvasKit.StrokeCap.Butt;
324 opts.join = opts.join || CanvasKit.StrokeJoin.Miter;
332 CanvasKit.SkPath.prototype.transform = function() {
352 CanvasKit.SkPath.prototype.trim = function(startT, stopT, isComplement) {
365 CanvasKit.SkVertices.prototype.applyBones = function(bones) {
366 var bPtr = copy3dArray(bones, CanvasKit.HEAPF32);
368 CanvasKit._free(bPtr);
372 CanvasKit.SkImage.prototype.encodeToData = function() {
385 CanvasKit.SkCanvas.prototype.drawText = function(str, x, y, font, paint) {
390 var strPtr = CanvasKit._malloc(strLen);
397 CanvasKit.SkCanvas.prototype.readPixels = function(x, y, w, h, alphaType,
400 alphaType = alphaType || CanvasKit.AlphaType.Unpremul;
401 colorType = colorType || CanvasKit.ColorType.RGBA_8888;
405 var pptr = CanvasKit._malloc(len);
413 CanvasKit._free(pptr);
419 var pixels = new Uint8Array(CanvasKit.HEAPU8.buffer, pptr, len).slice();
420 CanvasKit._free(pptr);
426 CanvasKit.SkCanvas.prototype.writePixels = function(pixels, srcWidth, srcHeight,
433 alphaType = alphaType || CanvasKit.AlphaType.Unpremul;
434 colorType = colorType || CanvasKit.ColorType.RGBA_8888;
437 var pptr = CanvasKit._malloc(pixels.byteLength);
438 CanvasKit.HEAPU8.set(pixels, pptr);
447 CanvasKit._free(pptr);
452 CanvasKit.SkFontMgr.prototype.MakeTypefaceFromData = function(fontData) {
455 var fptr = CanvasKit._malloc(data.byteLength);
456 CanvasKit.HEAPU8.set(data, fptr);
467 CanvasKit.SkTextBlob.MakeFromText = function(str, font) {
472 var strPtr = CanvasKit._malloc(strLen);
476 …var blob = CanvasKit.SkTextBlob._MakeFromText(strPtr, strLen - 1, font, CanvasKit.TextEncoding.UTF…
484 CanvasKit._free(strPtr);
491 if (CanvasKit._extraInitializations) {
492 CanvasKit._extraInitializations.forEach(function(init) {
498 CanvasKit.LTRBRect = function(l, t, r, b) {
507 CanvasKit.XYWHRect = function(x, y, w, h) {
524 var ptr = CanvasKit._malloc(arr.length * dest.BYTES_PER_ELEMENT);
545 var ptr = CanvasKit._malloc(arr.length * arr[0].length * dest.BYTES_PER_ELEMENT);
564 …var ptr = CanvasKit._malloc(arr.length * arr[0].length * arr[0][0].length * dest.BYTES_PER_ELEMENT…
617 var ptr = copy1dArray(ta, CanvasKit.HEAPF32);
621 CanvasKit.MakePathFromCmds = function(cmds) {
623 var path = CanvasKit._MakePathFromCmds(ptrLen[0], ptrLen[1]);
624 CanvasKit._free(ptrLen[0]);
628 CanvasKit.MakeSkDashPathEffect = function(intervals, phase) {
635 var ptr = copy1dArray(intervals, CanvasKit.HEAPF32);
636 var dpe = CanvasKit._MakeSkDashPathEffect(ptr, intervals.length, phase);
637 CanvasKit._free(ptr);
642 CanvasKit.MakeImageFromEncoded = function(data) {
645 var iptr = CanvasKit._malloc(data.byteLength);
646 CanvasKit.HEAPU8.set(data, iptr);
647 var img = CanvasKit._decodeImage(iptr, data.byteLength);
650 CanvasKit._free(iptr);
655 CanvasKit._free(iptr);
662 CanvasKit.MakeImageShader = function(img, xTileMode, yTileMode, clampUnpremul, localMatrix) {
672 return CanvasKit._MakeImageShader(img, xTileMode, yTileMode, clampUnpremul, localMatrix);
674 return CanvasKit._MakeImageShader(img, xTileMode, yTileMode, clampUnpremul);
679 CanvasKit.MakeImage = function(pixels, width, height, alphaType, colorType) {
687 var pptr = CanvasKit._malloc(pixels.byteLength);
688 CanvasKit.HEAPU8.set(pixels, pptr);
691 return CanvasKit._MakeImage(info, pptr, pixels.byteLength, width * bytesPerPixel);
694 CanvasKit.MakeLinearGradientShader = function(start, end, colors, pos, mode, localMatrix, flags) {
695 var colorPtr = copy1dArray(colors, CanvasKit.HEAP32);
696 var posPtr = copy1dArray(pos, CanvasKit.HEAPF32);
704 var lgs = CanvasKit._MakeLinearGradientShader(start, end, colorPtr, posPtr,
707 var lgs = CanvasKit._MakeLinearGradientShader(start, end, colorPtr, posPtr,
711 CanvasKit._free(colorPtr);
712 CanvasKit._free(posPtr);
716CanvasKit.MakeRadialGradientShader = function(center, radius, colors, pos, mode, localMatrix, flag…
717 var colorPtr = copy1dArray(colors, CanvasKit.HEAP32);
718 var posPtr = copy1dArray(pos, CanvasKit.HEAPF32);
726 var rgs = CanvasKit._MakeRadialGradientShader(center, radius, colorPtr, posPtr,
729 var rgs = CanvasKit._MakeRadialGradientShader(center, radius, colorPtr, posPtr,
733 CanvasKit._free(colorPtr);
734 CanvasKit._free(posPtr);
738 CanvasKit.MakeTwoPointConicalGradientShader = function(start, startRadius, end, endRadius,
740 var colorPtr = copy1dArray(colors, CanvasKit.HEAP32);
741 var posPtr = copy1dArray(pos, CanvasKit.HEAPF32);
749 var rgs = CanvasKit._MakeTwoPointConicalGradientShader(
753 var rgs = CanvasKit._MakeTwoPointConicalGradientShader(
758 CanvasKit._free(colorPtr);
759 CanvasKit._free(posPtr);
763 CanvasKit.MakeSkVertices = function(mode, positions, textureCoordinates, colors,
765 var positionPtr = copy2dArray(positions, CanvasKit.HEAPF32);
766 var texPtr = copy2dArray(textureCoordinates, CanvasKit.HEAPF32);
770 var colorPtr = copy1dArray(colors, CanvasKit.HEAP32);
772 var boneIdxPtr = copy2dArray(boneIndices, CanvasKit.HEAP32);
773 var boneWtPtr = copy2dArray(boneWeights, CanvasKit.HEAPF32);
774 var idxPtr = copy1dArray(indices, CanvasKit.HEAPU16);
779 var vertices = CanvasKit._MakeSkVertices(mode, positions.length, positionPtr,
782 positionPtr && CanvasKit._free(positionPtr);
783 texPtr && CanvasKit._free(texPtr);
784 colorPtr && CanvasKit._free(colorPtr);
785 idxPtr && CanvasKit._free(idxPtr);
786 boneIdxPtr && CanvasKit._free(boneIdxPtr);
787 boneWtPtr && CanvasKit._free(boneWtPtr);