Lines Matching refs:CanvasKit
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);
38 CanvasKit.Font.prototype.getGlyphIDs = function(str, numGlyphIDs, optionalOutputArray) {
46 var strPtr = CanvasKit._malloc(strBytes);
50 var glyphPtr = CanvasKit._malloc(numGlyphIDs * bytesPerGlyph);
53 CanvasKit._free(strPtr);
56 CanvasKit._free(glyphPtr);
59 var glyphs = new Uint16Array(CanvasKit.HEAPU8.buffer, glyphPtr, actualIDs);
62 CanvasKit._free(glyphPtr);
66 CanvasKit._free(glyphPtr);
73 CanvasKit.Font.prototype.getGlyphWidths = function(glyphs, paint, optionalOutputArray) {
76 var widthPtr = CanvasKit._malloc(glyphs.length * bytesPerWidth);
79 var widths = new Float32Array(CanvasKit.HEAPU8.buffer, widthPtr, glyphs.length);
83 CanvasKit._free(widthPtr);
87 CanvasKit._free(widthPtr);
92 CanvasKit.FontMgr.FromData = function() {
116 var fm = CanvasKit.FontMgr._fromData(datasPtr, sizesPtr, fonts.length);
118 CanvasKit._free(datasPtr);
119 CanvasKit._free(sizesPtr);
124 CanvasKit.FontMgr.prototype.MakeTypefaceFromData = function(fontData) {
138 CanvasKit.TextBlob.MakeOnPath = function(str, path, font, initialOffset) {
159 var rsx = new CanvasKit.RSXFormBuilder();
160 var meas = new CanvasKit.ContourMeasureIter(path, false, 1);
201 CanvasKit.TextBlob.MakeFromRSXform = function(str, rsxBuilderOrArray, font) {
206 var strPtr = CanvasKit._malloc(strLen);
217 var blob = CanvasKit.TextBlob._MakeFromRSXform(strPtr, strLen - 1, rPtr, font);
218 CanvasKit._free(strPtr);
228 CanvasKit.TextBlob.MakeFromRSXformGlyphs = function(glyphs, rsxBuilderOrArray, font) {
240 …var blob = CanvasKit.TextBlob._MakeFromRSXformGlyphs(glyphPtr, glyphs.length * bytesPerGlyph, rPtr…
251 CanvasKit.TextBlob.MakeFromGlyphs = function(glyphs, font) {
255 var blob = CanvasKit.TextBlob._MakeFromGlyphs(glyphPtr, glyphs.length * bytesPerGlyph, font);
264 CanvasKit.TextBlob.MakeFromText = function(str, font) {
269 var strPtr = CanvasKit._malloc(strLen);
273 var blob = CanvasKit.TextBlob._MakeFromText(strPtr, strLen - 1, font);
274 CanvasKit._free(strPtr);
284 CanvasKit.MallocGlyphIDs = function(numGlyphIDs) {
285 return CanvasKit.Malloc(Uint16Array, numGlyphIDs);