| 86 | float xg::shape::Text::GetSpacingY() const { return std::isnan(lineHeight_) ? fontSize_ * 0.14 : (lineHeight_ - fontSize_); } |
| 87 | |
| 88 | float xg::shape::Text::GetTextHeight() const { |
| 89 | if(!std::isnan(height_)) { |
| 90 | return height_; |
| 91 | } |
| 92 | const float fontSize = fontSize_ * 1; |
| 93 | if(lineCount_ > 1) { |
| 94 | return fontSize * lineCount_ + GetSpacingY() * (lineCount_ - 1); |
| 95 | } |
| 96 | return fontSize; |
| 97 | } |
| 98 | |
| 99 | float xg::shape::Text::GetTextWidth(canvas::CanvasContext &context) const { |
| 100 | if(!std::isnan(width_)) { |
no outgoing calls
no test coverage detected