• Home
  • Raw
  • Download

Lines Matching refs:CanvasKit

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) {
43 var typeface = CanvasKit.FontMgr.RefDefault().MakeTypefaceFromData(font);
58 CanvasKit.ParagraphStyle = function(s) {
73 s['textAlign'] = s['textAlign'] || CanvasKit.TextAlign.Start;
74 s['textDirection'] = s['textDirection'] || CanvasKit.TextDirection.LTR;
75 s['textHeightBehavior'] = s['textHeightBehavior'] || CanvasKit.TextHeightBehavior.All;
76 s['textStyle'] = CanvasKit.TextStyle(s['textStyle']);
84 s['weight'] = CanvasKit.FontWeight.Normal;
86 s['width'] = s['width'] || CanvasKit.FontWidth.Normal;
87 s['slant'] = s['slant'] || CanvasKit.FontSlant.Upright;
111 CanvasKit.TextStyle = function(s) {
114 s['color'] = CanvasKit.BLACK;
119 s['decorationStyle'] = s['decorationStyle'] || CanvasKit.DecorationStyle.Solid;
120 s['textBaseline'] = s['textBaseline'] || CanvasKit.TextBaseline.Alphabetic;
137 var shadowColors = shadows.map(function(s) { return s['color'] || CanvasKit.BLACK; });
140 var ptr = CanvasKit._malloc(shadows.length * 2, 'HEAPF32');
144 CanvasKit.HEAPF32[adjustedPtr] = offset[0];
145 CanvasKit.HEAPF32[adjustedPtr + 1] = offset[1];
206 var strPtr = CanvasKit._malloc(strLen);
214 var scratchForegroundColorPtr = CanvasKit._malloc(4 * 4); // room for 4 32bit floats
215 var scratchBackgroundColorPtr = CanvasKit._malloc(4 * 4); // room for 4 32bit floats
216 var scratchDecorationColorPtr = CanvasKit._malloc(4 * 4); // room for 4 32bit floats
248 CanvasKit._free(textStyle['_fontFamiliesPtr']);
251 CanvasKit.ParagraphBuilder.Make = function(paragraphStyle, fontManager) {
254 var result = CanvasKit.ParagraphBuilder._Make(paragraphStyle, fontManager);
259 CanvasKit.ParagraphBuilder.MakeFromFontProvider = function(paragraphStyle, fontProvider) {
262 … var result = CanvasKit.ParagraphBuilder._MakeFromFontProvider(paragraphStyle, fontProvider);
267 CanvasKit.ParagraphBuilder.ShapeText = function(text, blocks, width) {
275 return CanvasKit.ParagraphBuilder._ShapeText(text, blocks, width);
278 CanvasKit.ParagraphBuilder.prototype.pushStyle = function(textStyle) {
284 CanvasKit.ParagraphBuilder.prototype.pushPaintStyle = function(textStyle, fg, bg) {
290 CanvasKit.ParagraphBuilder.prototype.addPlaceholder =
294 alignment = alignment || CanvasKit.PlaceholderAlignment.Baseline;
295 baseline = baseline || CanvasKit.TextBaseline.Alphabetic;