(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate)
| 7642 | } |
| 7643 | |
| 7644 | function getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate) { |
| 7645 | var contentBlock = parsePlainText(text, font, textPadding, textLineHeight, truncate); |
| 7646 | var outerWidth = getWidth(text, font); |
| 7647 | if (textPadding) { |
| 7648 | outerWidth += textPadding[1] + textPadding[3]; |
| 7649 | } |
| 7650 | var outerHeight = contentBlock.outerHeight; |
| 7651 | |
| 7652 | var x = adjustTextX(0, outerWidth, textAlign); |
| 7653 | var y = adjustTextY(0, outerHeight, textVerticalAlign); |
| 7654 | |
| 7655 | var rect = new BoundingRect(x, y, outerWidth, outerHeight); |
| 7656 | rect.lineHeight = contentBlock.lineHeight; |
| 7657 | |
| 7658 | return rect; |
| 7659 | } |
| 7660 | |
| 7661 | function getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) { |
| 7662 | var contentBlock = parseRichText(text, { |
no test coverage detected