Lines Matching refs:style

204 void Text::ReMeasureTextSize(const Rect& textRect, const Style& style)
211 textSize_ = TypedText::GetTextSize(text_, fontId_, fontSize_, style.letterSpace_, style.lineHeight_, maxWidth,
212 style.lineSpace_, spannableString_, IsEliminateTrailingSpaces());
223 void Text::ReMeasureTextWidthInEllipsisMode(const Rect& textRect, const Style& style, uint16_t ellipsisIndex)
228 uint16_t lineCount = GetLine(lineMaxWidth, style.letterSpace_, ellipsisIndex, maxLineBytes);
249 const Style& style,
259 Draw(gfxDstBuffer, mask, textRect, style, offsetX, ellipsisIndex, opaScale);
266 const Style& style,
275 uint16_t lineCount = GetLine(lineMaxWidth, style.letterSpace_, ellipsisIndex, maxLineBytes);
276 int16_t lineHeight = style.lineHeight_;
282 CalculatedCurLineHeight(lineHeight, curLineHeight, fontHeight, style, lineMaxHeight);
283 Point pos = GetPos(lineHeight, style, lineCount, coords);
284 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.textOpa_);
295 if ((style.lineHeight_ == 0) && (spannableString_ != nullptr)) {
300 curLineHeight += style.lineSpace_;
305 curLineHeight -= style.lineSpace_;
309 if (lineHeight != style.lineHeight_) {
310 nextLine -= style.lineSpace_;
317 0, opa, style, &text_[lineBegin], lineBytes,
332 SetNextLineBegin(style, lineMaxHeight, curLineHeight, pos,
339 uint16_t fontHeight, const Style& style, uint16_t lineMaxHeight)
343 lineHeight += style.lineSpace_;
345 if ((style.lineSpace_ == 0) && (spannableString_ != nullptr)) {
347 curLineHeight += style.lineSpace_;
353 Point Text::GetPos(int16_t& lineHeight, const Style& style, uint16_t& lineCount, const Rect& coords)
356 if (lineHeight == style.lineHeight_) {
359 pos.y = TextPositionY(coords, (lineCount * lineHeight - style.lineSpace_));
377 void Text::SetNextLineBegin(const Style& style, uint16_t lineMaxHeight, int16_t& curLineHeight, Point& pos,
487 uint16_t Text::GetEllipsisIndex(const Rect& textRect, const Style& style)
493 int16_t letterWidth = fontEngine->GetWidth(TEXT_ELLIPSIS_UNICODE, fontId_, fontSize_, 0) + style.letterSpace_;
497 int16_t height = style.lineHeight_;
499 height = fontEngine->GetHeight(fontId_, fontSize_) + style.lineSpace_;
504 if (height != style.lineHeight_) {
505 p.y -= style.lineSpace_;
507 return GetLetterIndexByPosition(textRect, style, p);
510 uint16_t Text::GetLetterIndexByLinePosition(const Style& style, int16_t contentWidth,
519 int16_t lineHeight = style.lineHeight_;
520 UIFontAdaptor::GetNextLineAndWidth(text_, fontId_, fontSize_, style.letterSpace_,
526 uint16_t Text::GetPosXByLetterIndex(const Rect &textRect, const Style &style,
536 style.letterSpace_, beginIndex, count);
541 uint16_t Text::GetLetterIndexByPosition(const Rect& textRect, const Style& style, const Point& pos)
548 int16_t lineHeight = style.lineHeight_;
551 lineHeight = letterHeight + style.lineSpace_;
554 if (lineHeight != style.lineHeight_) {
565 nextLineStart += UIFontAdaptor::GetNextLineAndWidth(&text_[lineStart], fontId_, fontSize_, style.letterSpace_,
583 UIFontAdaptor::GetNextLineAndWidth(&text_[lineStart], fontId_, fontSize_, style.letterSpace_, width, lineHeight,
660 const Style& style, uint16_t beginIndex, uint16_t num)
662 return GetPosXByLetterIndex(textRect, style, beginIndex, num);
665 int16_t Text::GetMetaTextWidth(const Style& style)
667 return TypedText::GetTextWidth(text_, GetFontId(), GetFontSize(), strlen(text_), style.letterSpace_);