/external/skia/modules/canvaskit/htmlcanvas/ |
D | _namedcolors.js | 10 }).then((CanvasKit) => { 13 'aliceblue': CanvasKit.Color(240, 248, 255), 14 'antiquewhite': CanvasKit.Color(250, 235, 215), 15 'aqua': CanvasKit.Color(0, 255, 255), 16 'aquamarine': CanvasKit.Color(127, 255, 212), 17 'azure': CanvasKit.Color(240, 255, 255), 18 'beige': CanvasKit.Color(245, 245, 220), 19 'bisque': CanvasKit.Color(255, 228, 196), 20 'black': CanvasKit.Color(0, 0, 0), 21 'blanchedalmond': CanvasKit.Color(255, 235, 205), [all …]
|
D | canvas2dcontext.js | 3 this._paint = new CanvasKit.Paint(); 7 this._paint.setStrokeCap(CanvasKit.StrokeCap.Butt); 8 this._paint.setStrokeJoin(CanvasKit.StrokeJoin.Miter); 11 this._font = new CanvasKit.Font(null, 10); 14 this._strokeStyle = CanvasKit.BLACK; 15 this._fillStyle = CanvasKit.BLACK; 17 this._shadowColor = CanvasKit.TRANSPARENT; 25 this._globalCompositeOperation = CanvasKit.BlendMode.SrcOver; 30 this._currentPath = new CanvasKit.Path(); 31 this._currentTransform = CanvasKit.Matrix.identity(); [all …]
|
/external/skqp/experimental/canvaskit/htmlcanvas/ |
D | _namedcolors.js | 10 }).ready().then((CanvasKit) => { 13 'aliceblue': CanvasKit.Color(240, 248, 255), 14 'antiquewhite': CanvasKit.Color(250, 235, 215), 15 'aqua': CanvasKit.Color(0, 255, 255), 16 'aquamarine': CanvasKit.Color(127, 255, 212), 17 'azure': CanvasKit.Color(240, 255, 255), 18 'beige': CanvasKit.Color(245, 245, 220), 19 'bisque': CanvasKit.Color(255, 228, 196), 20 'black': CanvasKit.Color(0, 0, 0), 21 'blanchedalmond': CanvasKit.Color(255, 235, 205), [all …]
|
D | canvas2dcontext.js | 3 this._paint = new CanvasKit.SkPaint(); 7 this._paint.setStrokeCap(CanvasKit.StrokeCap.Butt); 8 this._paint.setStrokeJoin(CanvasKit.StrokeJoin.Miter); 11 this._font = new CanvasKit.SkFont(null, 10); 13 this._strokeStyle = CanvasKit.BLACK; 14 this._fillStyle = CanvasKit.BLACK; 16 this._shadowColor = CanvasKit.TRANSPARENT; 24 this._globalCompositeOperation = CanvasKit.BlendMode.SrcOver; 25 this._imageFilterQuality = CanvasKit.FilterQuality.Low; 32 this._currentPath = new CanvasKit.SkPath(); [all …]
|
/external/skia/modules/canvaskit/tests/ |
D | canvas.spec.js | 18 const paint = new CanvasKit.Paint(); 21 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0)); 22 paint.setStyle(CanvasKit.PaintStyle.Stroke); 25 const rrect = CanvasKit.RRectXY([5, 35, 45, 80], 15, 10); 28 canvas.drawOval(CanvasKit.LTRBRect(5, 35, 45, 80), paint); 30 canvas.drawArc(CanvasKit.LTRBRect(55, 35, 95, 80), 15, 270, true, paint); 32 const font = new CanvasKit.Font(null, 20); 35 const blob = CanvasKit.TextBlob.MakeFromText('Unicode chars é É ص', font); 45 const path = starPath(CanvasKit); 46 const paint = new CanvasKit.Paint(); [all …]
|
D | core.spec.js | 18 const spr = new CanvasKit.PictureRecorder(); 20 CanvasKit.LTRBRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT)); 21 const paint = new CanvasKit.Paint(); 24 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0)); 25 paint.setStyle(CanvasKit.PaintStyle.Stroke); 27 rcanvas.drawRRect(CanvasKit.RRectXY([5, 35, 45, 80], 15, 10), paint); 29 const font = new CanvasKit.Font(null, 20); 44 return CanvasKit.Color( 54 ambient: CanvasKit.BLUE, 55 spot: CanvasKit.RED, [all …]
|
D | path.spec.js | 18 const paint = new CanvasKit.Paint(); 21 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0)); 22 paint.setStyle(CanvasKit.PaintStyle.Stroke); 24 const path = new CanvasKit.Path(); 52 const rrect = CanvasKit.RRectXY([100, 10, 140, 62], 10, 4); 54 const rrectPath = new CanvasKit.Path().addRRect(rrect, true); 67 const path = CanvasKit.Path.MakeFromSVGString( 75 expect(cmds).toEqual([[CanvasKit.MOVE_VERB, 205, 5], 76 [CanvasKit.LINE_VERB, 795, 5], 77 [CanvasKit.LINE_VERB, 595, 295], [all …]
|
D | paragraph.spec.js | 50 const paint = new CanvasKit.Paint(); 52 paint.setColor(CanvasKit.RED); 53 paint.setStyle(CanvasKit.PaintStyle.Stroke); 55 const fontMgr = CanvasKit.FontMgr.FromData(notoSerifFontBuffer); 61 const paraStyle = new CanvasKit.ParagraphStyle({ 63 color: CanvasKit.BLACK, 67 textAlign: CanvasKit.TextAlign.Center, 72 const builder = CanvasKit.ParagraphBuilder.Make(paraStyle, fontMgr); 75 const blueText = new CanvasKit.TextStyle({ 76 backgroundColor: CanvasKit.Color(234, 208, 232), // light pink [all …]
|
D | font.spec.js | 37 const paint = new CanvasKit.Paint(); 39 paint.setStyle(CanvasKit.PaintStyle.Stroke); 41 const font = new CanvasKit.Font(null, 24); 42 const fontPaint = new CanvasKit.Paint(); 44 fontPaint.setStyle(CanvasKit.PaintStyle.Fill); 47 const arc = new CanvasKit.Path(); 48 arc.arcToOval(CanvasKit.LTRBRect(20, 40, 280, 300), -160, 140, true); 50 arc.arcToOval(CanvasKit.LTRBRect(20, 0, 280, 260), 160, -140, true); 54 const textBlob = CanvasKit.TextBlob.MakeOnPath(str, arc, font); 67 const fontMgr = CanvasKit.FontMgr.RefDefault(); [all …]
|
D | matrix.spec.js | 19 CanvasKit.Matrix.translated(5, -1), 27 CanvasKit.Matrix.scaled(2, 3), 35 CanvasKit.Matrix.rotated(Math.PI, 9, 9), 43 CanvasKit.Matrix.skewed(4, 3, 2, 1), 66 CanvasKit.Matrix.multiply(a, b), 77 const b = CanvasKit.Matrix.invert(a); 79 CanvasKit.Matrix.multiply(a, b), 80 CanvasKit.Matrix.identity()); 98 CanvasKit.Matrix.mapPoints(a, points), 107 CanvasKit.M44.translated([5, 6, 7]), [all …]
|
/external/skia/tools/perf-canvaskit-puppeteer/ |
D | canvas_perf.js | 7 function randomColorTwo(CanvasKit, i, j) { argument 11 return CanvasKit.Color4f(...c); 14 function randomColor(CanvasKit) { argument 15 return CanvasKit.Color4f(Math.random(), Math.random(), Math.random(), Math.random()); 18 function starPath(CanvasKit, X=128, Y=128, R=116) { argument 19 const p = new CanvasKit.Path(); 31 setup: function(CanvasKit, ctx) { argument 34 test: function(CanvasKit, ctx) { argument 40 ctx.canvas.clipRect(CanvasKit.LTRBRect(x, y, x+50, y+50), 41 CanvasKit.ClipOp.Intersect, false); [all …]
|
/external/skqp/experimental/canvaskit/ |
D | interface.js | 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) { [all …]
|
D | cpu.js | 3 (function(CanvasKit){ argument 4 CanvasKit._extraInitializations = CanvasKit._extraInitializations || []; 5 CanvasKit._extraInitializations.push(function() { 7 CanvasKit.MakeSWCanvasSurface = function(idOrElement) { 17 var surface = CanvasKit.MakeSurface(canvas.width, canvas.height); 25 if (!CanvasKit.MakeCanvasSurface) { 26 CanvasKit.MakeCanvasSurface = CanvasKit.MakeSWCanvasSurface; 29 CanvasKit.MakeSurface = function(width, height) { 34 'colorType': CanvasKit.ColorType.RGBA_8888, 37 'alphaType': CanvasKit.AlphaType.Unpremul, [all …]
|
/external/skia/modules/canvaskit/ |
D | interface.js | 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 [all …]
|
D | cpu.js | 5 (function(CanvasKit){ argument 6 CanvasKit._extraInitializations = CanvasKit._extraInitializations || []; 7 CanvasKit._extraInitializations.push(function() { 9 CanvasKit.MakeSWCanvasSurface = function(idOrElement) { 20 var surface = CanvasKit.MakeSurface(canvas.width, canvas.height); 28 if (!CanvasKit.MakeCanvasSurface) { 29 CanvasKit.MakeCanvasSurface = CanvasKit.MakeSWCanvasSurface; 36 CanvasKit.MakeSurface = function(width, height) { 40 'colorType': CanvasKit.ColorType.RGBA_8888, 43 'alphaType': CanvasKit.AlphaType.Unpremul, [all …]
|
D | font.js | 1 CanvasKit._extraInitializations = CanvasKit._extraInitializations || []; 2 CanvasKit._extraInitializations.push(function() { 4 CanvasKit.Canvas.prototype.drawText = function(str, x, y, paint, font) { 10 var strPtr = CanvasKit._malloc(strLen + 1); 13 CanvasKit._free(strPtr); 20 CanvasKit.Font.prototype.getGlyphBounds = function(glyphs, paint, optionalOutputArray) { 23 var rectPtr = CanvasKit._malloc(glyphs.length * bytesPerRect); 26 var rects = new Float32Array(CanvasKit.HEAPU8.buffer, rectPtr, glyphs.length * 4); 30 CanvasKit._free(rectPtr); 34 CanvasKit._free(rectPtr); [all …]
|
D | paragraph.js | 1 (function(CanvasKit){ argument 2 CanvasKit._extraInitializations = CanvasKit._extraInitializations || []; 3 CanvasKit._extraInitializations.push(function() { 5 CanvasKit.Paragraph.prototype.getRectsForRange = function(start, end, hStyle, wStyle) { 14 CanvasKit.Paragraph.prototype.getRectsForPlaceholders = function() { 29 … var r = CanvasKit.LTRBRect(floatArray[i], floatArray[i+1], floatArray[i+2], floatArray[i+3]); 31 r['direction'] = CanvasKit.TextDirection.RTL; 33 r['direction'] = CanvasKit.TextDirection.LTR; 37 CanvasKit._free(floatArray.byteOffset); 42 CanvasKit.TypefaceFontProvider.prototype.registerFont = function(font, family) { [all …]
|
D | color.js | 11 CanvasKit.Color = function(r, g, b, a) { 15 return CanvasKit.Color4f(clamp(r)/255, clamp(g)/255, clamp(b)/255, a); 20 CanvasKit.ColorAsInt = function(r, g, b, a) { 35 CanvasKit.Color4f = function(r, g, b, a) { 44 Object.defineProperty(CanvasKit, 'TRANSPARENT', { 45 get: function() { return CanvasKit.Color4f(0, 0, 0, 0); } 47 Object.defineProperty(CanvasKit, 'BLACK', { 48 get: function() { return CanvasKit.Color4f(0, 0, 0, 1); } 50 Object.defineProperty(CanvasKit, 'WHITE', { 51 get: function() { return CanvasKit.Color4f(1, 1, 1, 1); } [all …]
|
D | matrix.js | 10 CanvasKit.Matrix = {}; 51 CanvasKit.Matrix.identity = function() { 57 CanvasKit.Matrix.invert = function(m) { 81 CanvasKit.Matrix.mapPoints = function(matrix, ptArr) { 146 CanvasKit.Matrix.multiply = function() { 153 CanvasKit.Matrix.rotated = function(radians, px, py) { 165 CanvasKit.Matrix.scaled = function(sx, sy, px, py) { 172 CanvasKit.Matrix.skewed = function(kx, ky, px, py) { 179 CanvasKit.Matrix.translated = function(dx, dy) { 186 CanvasKit.Vector = {}; [all …]
|
D | helper.js | 52 CanvasKit.FourFloatArrayHelper = function() { 68 CanvasKit.FourFloatArrayHelper.prototype.push = function(f1, f2, f3, f4) { 80 CanvasKit.FourFloatArrayHelper.prototype.set = function(idx, f1, f2, f3, f4) { 90 CanvasKit.HEAPF32[floatPtr] = f1; 91 CanvasKit.HEAPF32[floatPtr + 1] = f2; 92 CanvasKit.HEAPF32[floatPtr + 2] = f3; 93 CanvasKit.HEAPF32[floatPtr + 3] = f4; 107 CanvasKit.FourFloatArrayHelper.prototype.build = function() { 121 CanvasKit.FourFloatArrayHelper.prototype.delete = function() { 123 CanvasKit._free(this._ptr); [all …]
|
D | skottie.js | 17 CanvasKit.MakeManagedAnimation = function(json, assets, prop_filter_prefix, soundMap, logger) { 18 if (!CanvasKit._MakeManagedAnimation) { 25 return CanvasKit._MakeManagedAnimation(json, 0, nullptr, nullptr, nullptr, prop_filter_prefix, 38 var iptr = CanvasKit._malloc(data.byteLength); 39 CanvasKit.HEAPU8.set(data, iptr); 47 var strPtr = CanvasKit._malloc(strLen); 59 var anim = CanvasKit._MakeManagedAnimation(json, assetKeys.length, namesPtr, 64 CanvasKit._free(namesPtr); 65 CanvasKit._free(assetsPtr); 66 CanvasKit._free(assetSizesPtr); [all …]
|
D | particles.js | 7 CanvasKit.MakeParticles = function(json, assets) { 8 if (!CanvasKit._MakeParticles) { 12 return CanvasKit._MakeParticles(json, 0, nullptr, nullptr, nullptr); 24 var iptr = CanvasKit._malloc(data.byteLength); 25 CanvasKit.HEAPU8.set(data, iptr); 33 var strPtr = CanvasKit._malloc(strLen); 45 var particles = CanvasKit._MakeParticles(json, assetKeys.length, 49 CanvasKit._free(namesPtr); 50 CanvasKit._free(assetsPtr); 51 CanvasKit._free(assetSizesPtr); [all …]
|
/external/skqp/experimental/canvaskit/tests/ |
D | path.spec.js | 7 var CanvasKit = null; 9 if (CanvasKit) { 15 CanvasKit = _CanvasKit; 55 const surface = CanvasKit.MakeCanvasSurface('test'); 62 const paint = new CanvasKit.SkPaint(); 65 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0)); 66 paint.setStyle(CanvasKit.PaintStyle.Stroke); 68 const path = new CanvasKit.SkPath(); 96 let rrect = new CanvasKit.SkPath() 116 const surface = CanvasKit.MakeCanvasSurface('test'); [all …]
|
/external/skia/site/docs/user/modules/ |
D | quickstart.md | 3 title: "CanvasKit - Quickstart" 4 linkTitle: "CanvasKit - Quickstart" 9 CanvasKit is a wasm module that uses Skia to draw to canvas elements a more advance feature set tha… 26 ckLoaded.then((CanvasKit) => { 27 const surface = CanvasKit.MakeCanvasSurface('foo'); 29 const paint = new CanvasKit.Paint(); 30 paint.setColor(CanvasKit.Color4f(0.9, 0, 0, 1.0)); 31 paint.setStyle(CanvasKit.PaintStyle.Stroke); 33 const rr = CanvasKit.RRectXY(CanvasKit.LTRBRect(10, 60, 210, 260), 25, 15); 36 canvas.clear(CanvasKit.WHITE); [all …]
|
D | canvaskit.md | 2 title: 'CanvasKit - Skia + WebAssembly' 3 linkTitle: 'CanvasKit - Skia + WebAssembly' 11 CanvasKit provides a playground for testing new Canvas and SVG platform APIs, 136 let CanvasKit = null; 147 CanvasKit = CK; 148 DrawingExample(CanvasKit); 149 InkExample(CanvasKit); 150 ShapingExample(CanvasKit); 152 SkottieExample(CanvasKit, 'sk_legos', legoJSON, [-183, -100, 483, 400]); 154 SkottieExample(CanvasKit, 'sk_drinks', drinksJSON, fullBounds); [all …]
|