Lines Matching refs:textStyle
218 function copyArrays(textStyle) { argument
221 textStyle['_colorPtr'] = copyColorToWasm(textStyle['color']);
222 textStyle['_foregroundColorPtr'] = nullptr; // nullptr is 0, from helper.js
223 textStyle['_backgroundColorPtr'] = nullptr;
224 textStyle['_decorationColorPtr'] = nullptr;
225 if (textStyle['foregroundColor']) {
226 …textStyle['_foregroundColorPtr'] = copyColorToWasm(textStyle['foregroundColor'], scratchForeground…
228 if (textStyle['backgroundColor']) {
229 …textStyle['_backgroundColorPtr'] = copyColorToWasm(textStyle['backgroundColor'], scratchBackground…
231 if (textStyle['decorationColor']) {
232 …textStyle['_decorationColorPtr'] = copyColorToWasm(textStyle['decorationColor'], scratchDecoration…
235 if (Array.isArray(textStyle['fontFamilies']) && textStyle['fontFamilies'].length) {
236 textStyle['_fontFamiliesPtr'] = naiveCopyStrArray(textStyle['fontFamilies']);
237 textStyle['_fontFamiliesLen'] = textStyle['fontFamilies'].length;
239 textStyle['_fontFamiliesPtr'] = nullptr;
240 textStyle['_fontFamiliesLen'] = 0;
245 function freeArrays(textStyle) { argument
248 CanvasKit._free(textStyle['_fontFamiliesPtr']);
278 CanvasKit.ParagraphBuilder.prototype.pushStyle = function(textStyle) { argument
279 copyArrays(textStyle);
280 this._pushStyle(textStyle);
281 freeArrays(textStyle);
284 CanvasKit.ParagraphBuilder.prototype.pushPaintStyle = function(textStyle, fg, bg) { argument
285 copyArrays(textStyle);
286 this._pushPaintStyle(textStyle, fg, bg);
287 freeArrays(textStyle);