---------------------------- | Procedures in renderNode | ----------------------------
506527
function renderBackground(group, bg, useUpperLabel) {
        // For tooltip.
        bg.dataIndex = thisNode.dataIndex;
        bg.seriesIndex = seriesModel.seriesIndex;

        bg.setShape({x: 0, y: 0, width: thisWidth, height: thisHeight});
        var visualBorderColor = thisNode.getVisual('borderColor', true);
        var emphasisBorderColor = itemStyleEmphasisModel.get('borderColor');

        updateStyle(bg, function () {
            var normalStyle = getItemStyleNormal(itemStyleNormalModel);
            normalStyle.fill = visualBorderColor;
            var emphasisStyle = getItemStyleEmphasis(itemStyleEmphasisModel);
            emphasisStyle.fill = emphasisBorderColor;

            if (useUpperLabel) {
                var upperLabelWidth = thisWidth - 2 * borderWidth;

                prepareText(
                    normalStyle, emphasisStyle, visualBorderColor, upperLabelWidth, upperHeight,
                    {x: borderWidth, y: 0, width: upperLabelWidth, height: upperHeight}
                );
            }
            // For old bg.
            else {
                normalStyle.text = emphasisStyle.text = null;
            }

            bg.setStyle(normalStyle);
            graphic.setHoverStyle(bg, emphasisStyle);
        });

        group.add(bg);
    }
280452
private void processRenderFunction() {
    if (!hasInterface(processingEnv, component.asType(), HasRender.class)) {
      return;
    }

    componentExposedTypeBuilder.addMethod(MethodSpec
        .methodBuilder("vg$render")
        .addModifiers(Modifier.PUBLIC)
        .addAnnotation(JsMethod.class)
        .returns(VNode.class)
        .addParameter(CreateElementFunction.class, "createElementFunction")
        .addStatement("return super.render(new $T(createElementFunction))", VNodeBuilder.class)
        .build());

    addMethodToProto("vg$render");

    // Register the render method
    optionsBuilder.addStatement("options.addHookMethod($S, p.$L)", "render", "vg$render");
  }
603378
function () {
        var self = this;

        // Render any new items
        self.items().each(function (ctrl, index) {
          var containerElm;

          ctrl.parent(self);

          if (!ctrl.state.get('rendered')) {
            containerElm = self.getEl('body');

            // Insert or append the item
            if (containerElm.hasChildNodes() && index <= containerElm.childNodes.length - 1) {
              $(containerElm.childNodes[index]).before(ctrl.renderHtml());
            } else {
              $(containerElm).append(ctrl.renderHtml());
            }

            ctrl.postRender();
            ReflowQueue.add(ctrl);
          }
        });

        self._layout.applyClasses(self.items().filter(':visible'));
        self._lastRect = null;

        return self;
      }
451512
function renderRecursive(render, remaining, results) {
  results = results || [];
  // Once components is exhausted, we can render out the results array.
  if (!remaining[0]) {
    return render(results);
  }

  // Continue recursion for remaining items.
  // results.concat([value]) ensures [...results, value] instead of [...results, ...value]
  function nextRender(value) {
    return renderRecursive(render, remaining.slice(1), results.concat([value]));
  }

  // Each props.components entry is either an element or function [element factory]
  return typeof remaining[0] === 'function'
    ? // When it is a function, produce an element by invoking it with "render component values".
      remaining[0]({ results, render: nextRender })
    : // When it is an element, enhance the element's props with the render prop.
      cloneElement(remaining[0], { children: nextRender });
}
1285790
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WRow row = (WRow) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int cols = row.getChildCount();
		Size gap = row.getSpace();
		String gapString = gap != null ? gap.toString() : null;

		if (cols > 0) {
			xml.appendTagOpen("ui:row");
			xml.appendAttribute("id", component.getId());
			xml.appendOptionalAttribute("class", component.getHtmlClass());
			xml.appendOptionalAttribute("track", component.isTracking(), "true");
			xml.appendOptionalAttribute("gap", gapString);
			xml.appendClose();

			// Render margin
			MarginRendererUtil.renderMargin(row, renderContext);

			paintChildren(row, renderContext);

			xml.appendEndTag("ui:row");
		}
	}
608425
function(renderer) {
        var root = this.root;
        if(renderer.root.parentNode == this.rendererRoot) {
            root = renderer.root;
        }
        root.parentNode.removeChild(root);
        renderer.rendererRoot.appendChild(root);
    }
1206118
function (renderer, nodeName) {
		var markup =  ['<', nodeName, ' filled="f" stroked="f"'],
			style = ['position: ', ABSOLUTE, ';'];

		// divs and shapes need size
		if (nodeName === 'shape' || nodeName === DIV) {
			style.push('left:0;top:0;width:10px;height:10px;');
		}
		if (docMode8) {
			style.push('visibility: ', nodeName === DIV ? HIDDEN : VISIBLE);
		}

		markup.push(' style="', style.join(''), '"/>');

		// create element with default attributes and style
		if (nodeName) {
			markup = nodeName === DIV || nodeName === 'span' || nodeName === 'img' ?
				markup.join('')
				: renderer.prepVML(markup);
			this.element = createElement(markup);
		}

		this.renderer = renderer;
	}
1034828
static void render(List<AbstractConfigValue> stack, StringBuilder sb, int indent, boolean atRoot, String atKey,
            ConfigRenderOptions options) {
        boolean commentMerge = options.getComments();
        if (commentMerge) {
            sb.append("# unresolved merge of " + stack.size() + " values follows (\n");
            if (atKey == null) {
                indent(sb, indent, options);
                sb.append("# this unresolved merge will not be parseable because it's at the root of the object\n");
                indent(sb, indent, options);
                sb.append("# the HOCON format has no way to list multiple root objects in a single file\n");
            }
        }

        List<AbstractConfigValue> reversed = new ArrayList<AbstractConfigValue>();
        reversed.addAll(stack);
        Collections.reverse(reversed);

        int i = 0;
        for (AbstractConfigValue v : reversed) {
            if (commentMerge) {
                indent(sb, indent, options);
                if (atKey != null) {
                    sb.append("#     unmerged value " + i + " for key "
                            + ConfigImplUtil.renderJsonString(atKey) + " from ");
                } else {
                    sb.append("#     unmerged value " + i + " from ");
                }
                i += 1;
                sb.append(v.origin().description());
                sb.append("\n");

                for (String comment : v.origin().comments()) {
                    indent(sb, indent, options);
                    sb.append("# ");
                    sb.append(comment);
                    sb.append("\n");
                }
            }
            indent(sb, indent, options);

            if (atKey != null) {
                sb.append(ConfigImplUtil.renderJsonString(atKey));
                if (options.getFormatted())
                    sb.append(" : ");
                else
                    sb.append(":");
            }
            v.render(sb, indent, atRoot, options);
            sb.append(",");
            if (options.getFormatted())
                sb.append('\n');
        }
        // chop comma or newline
        sb.setLength(sb.length() - 1);
        if (options.getFormatted()) {
            sb.setLength(sb.length() - 1); // also chop comma
            sb.append("\n"); // put a newline back
        }
        if (commentMerge) {
            indent(sb, indent, options);
            sb.append("# ) end of unresolved merge\n");
        }
    }
1128006
private void paintRows(final WTable table, final WebXmlRenderContext renderContext) {
		XmlStringBuilder xml = renderContext.getWriter();
		TableModel model = table.getTableModel();

		xml.appendTagOpen("ui:tbody");
		xml.appendAttribute("id", table.getId() + ".body");
		xml.appendClose();

		if (model.getRowCount() == 0) {
			xml.appendTag("ui:nodata");
			xml.appendEscaped(table.getNoDataMessage());
			xml.appendEndTag("ui:nodata");
		} else {
			// If has at least one visible col, paint the rows.
			final int columnCount = table.getColumnCount();

			for (int i = 0; i < columnCount; i++) {
				if (table.getColumn(i).isVisible()) {
					doPaintRows(table, renderContext);
					break;
				}
			}
		}

		xml.appendEndTag("ui:tbody");
	}
1228121
function renderExample (divId, example) {
  var graph = graphs[example]

  var canvas = new Canvas(divId, {
    node: {
      DefaultNode: Node,
      InvalidNode,
      ToggleNode
    },
    util: { typeOfNode }
  })

  canvas.render(graph.view)

  dflow.fun(graph)()
}
322826
function TextLayerBuilder_render(timeout) {
      if (!this.divContentDone || this.renderingDone) {
        return;
      }

      if (this.renderTimer) {
        clearTimeout(this.renderTimer);
        this.renderTimer = null;
      }

      if (!timeout) { // Render right away
        this.renderLayer();
      } else { // Schedule
        var self = this;
        this.renderTimer = setTimeout(function() {
          self.renderLayer();
          self.renderTimer = null;
        }, timeout);
      }
    }
846548
function renderComponent() {
    d3.select('svg')
      .call(gridline);

    var canvas = d3.select('canvas').node();
    var ctx = canvas.getContext('2d');
    gridlineCanvas.context(ctx)();
}
870125
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {

		WTree tree = (WTree) component;
		XmlStringBuilder xml = renderContext.getWriter();

		// Check if rendering an open item request
		String openId = tree.getOpenRequestItemId();
		if (openId != null) {
			handleOpenItemRequest(tree, xml, openId);
			return;
		}

		// Check the tree has tree items (WCAG requirement)
		TreeItemModel model = tree.getTreeModel();
		if (model == null || model.getRowCount() <= 0) {
			LOG.warn("Tree not rendered as it has no items.");
			return;
		}

		xml.appendTagOpen("ui:tree");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("htree", WTree.Type.HORIZONTAL == tree.getType(), "true");
		xml.appendOptionalAttribute("multiple", WTree.SelectMode.MULTIPLE == tree.getSelectMode(), "true");
		xml.appendOptionalAttribute("disabled", tree.isDisabled(), "true");
		xml.appendOptionalAttribute("hidden", tree.isHidden(), "true");
		xml.appendOptionalAttribute("required", tree.isMandatory(), "true");

		switch (tree.getExpandMode()) {
			case CLIENT:
				xml.appendAttribute("mode", "client");
				break;

			case DYNAMIC:
				xml.appendAttribute("mode", "dynamic");
				break;

			case LAZY:
				xml.appendAttribute("mode", "lazy");
				break;

			default:
				throw new IllegalStateException("Invalid expand mode: " + tree.getType());
		}
		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(tree, renderContext);

		if (tree.getCustomTree() == null) {
			handlePaintItems(tree, xml);
		} else {
			handlePaintCustom(tree, xml);
		}

		DiagnosticRenderUtil.renderDiagnostics(tree, renderContext);
		xml.appendEndTag("ui:tree");
	}
96438
function () {
    var draw = this.el.components.draw;
    var selector = this.data.asset;
    var width = draw.data.width;
    var height = draw.data.height;

    if (this.rendering) {
      return;
    }

    this.rendering = true;

    var node = document.querySelector(selector);

    if (!node) {
      console.error('Could not find html element with selector "' + selector + '"');
      return;
    }

    if (!this.observer) {
      this.observer = new MutationObserver(function (mutations) {
        queueRender(node, width, height, function (canvas) {
          renderedCanvas = canvas;
          draw.render();
        });
      });

      var config = { attributes: true, childList: true, characterData: true, subtree: true };
      this.observer.observe(node, config);
    }

    queueRender(node, width, height, function (canvas) {
      renderedCanvas = canvas;
      draw.render();
    });
  }
291887
function renderPageTree(root, renderOpts) {

    renderOpts = u.assign({ openClass:'open' }, renderOpts);

    if (renderOpts.groupBy) {
      var folderPages =
        u.map(u.groupBy(root._children, renderOpts.groupBy), function(children, name) {
          if (name === 'undefined') { name = renderOpts.defaultGroup || ''; }
          return { folderPage: true,
                   _href:      name ? '/' + u.slugify(name) + '/' : '',
                   _children:  children,
                   name:       name };
        });
      return recurse(folderPages);
    }
    else return recurse(root._children);

    function recurse(children, pid) {
      pid = pid || renderOpts.pageTreeID || 'page-tree';
      var out = '\n<ul>';

      u.each(children, function(page) {
        var ppid = (pid + '-' + page._href).replace(/\W+/g, '-').replace(/^-|-$/g,'');
        out += '\n<li' + (page._children ? ' id="' + ppid + '" class="folder"' : '') + '>'
            + (page.folderPage ?
              ((page.name || page._href) ? '<span class="folderPage">' + (page.name || u.unslugify(page._href)) + '</span>' : '') :
              renderLink(u.assign({}, renderOpts, { href:page._href, title:(page.title || page.name) })))
            + (page._children ? recurse(page._children, ppid) : '')
            + '</li>';
      });
      return out + '\n</ul>';
    }
  }
1342430
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WFieldLayout fieldLayout = (WFieldLayout) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int labelWidth = fieldLayout.getLabelWidth();
		String title = fieldLayout.getTitle();

		xml.appendTagOpen("ui:fieldlayout");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", fieldLayout.isHidden(), "true");
		xml.appendOptionalAttribute("labelWidth", labelWidth > 0, labelWidth);
		xml.appendAttribute("layout", fieldLayout.getLayoutType());
		xml.appendOptionalAttribute("title", title);
		// Ordered layout
		if (fieldLayout.isOrdered()) {
			xml.appendAttribute("ordered", fieldLayout.getOrderedOffset());
		}
		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(fieldLayout, renderContext);

		// Paint Fields
		paintChildren(fieldLayout, renderContext);

		xml.appendEndTag("ui:fieldlayout");
	}
540751
function(){
            var self = this,
                renderLogContainer = document.createElement('div'),
                renderLogRenderCountNode = document.createElement("div"),
                renderLogDetailContainer = document.createElement("div"),
                renderLogNotesNode = document.createElement("div"),
                renderLogDetailNode = document.createElement("div");

            renderLogContainer.className = 'renderLog';

            // Apply styling
            this._applyCSSStyling(renderLogContainer, this.styling.renderLog);

            // Attach the click handler for toggling the detail log
            renderLogContainer.addEventListener('click', function(){

                // Show the detail Log
                if(renderLogRenderCountNode.style.display === 'none') {
                    renderLogRenderCountNode.style.display = 'block';
                    renderLogDetailContainer.style.display = 'none';
                    renderLogContainer.style.zIndex = '10000';

                // Hide it
                } else {
                    renderLogRenderCountNode.style.display = 'none';
                    renderLogDetailContainer.style.display = 'block';
                    renderLogContainer.style.zIndex = '10001';
                }
            });

            renderLogRenderCountNode.className = 'renderLogCounter';
            renderLogRenderCountNode.innerText = 1;

            renderLogDetailContainer.style.display = 'none';
            renderLogDetailNode.innerText = '';

            if (this.shouldComponentUpdate) {
                renderLogNotesNode.innerText = 'NOTE: This component uses a custom shouldComponentUpdate(), so the results above are purely informational';
            }

            this._applyCSSStyling(renderLogNotesNode, this.styling.renderLogDetailNotes);

            renderLogDetailContainer.appendChild(renderLogDetailNode);
            renderLogDetailContainer.appendChild(renderLogNotesNode);

            renderLogContainer.appendChild(renderLogRenderCountNode);
            renderLogContainer.appendChild(renderLogDetailContainer);

            this.renderLogContainer = renderLogContainer;
            this.renderLogDetail = renderLogDetailNode;
            this.renderLogNotes = renderLogNotesNode;
            this.renderLogRenderCount = renderLogRenderCountNode;

            // Append to the body
            document.getElementsByTagName('body')[0].appendChild(renderLogContainer);

            // Set initial position
            this._updateRenderLogPosition();

            //
            this._updateRenderLogNode();

        }