'use strict';

require('../util/graphic.js');
var Text = require('../../../../../zrender@6.0.0/node_modules/zrender/lib/graphic/Text.js');

function getTextRect(text, font, align, verticalAlign, padding, rich, truncate, lineHeight) {
  var textEl = new Text.default({
    style: {
      text: text,
      font: font,
      align: align,
      verticalAlign: verticalAlign,
      padding: padding,
      rich: rich,
      overflow: truncate ? 'truncate' : null,
      lineHeight: lineHeight
    }
  });
  return textEl.getBoundingRect();
}

exports.getTextRect = getTextRect;
