/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/search/ |
H A D | search_text_field.cpp | 100 auto textWidth = static_cast<int32_t>(contentController_->GetWideText().length()); in ProcessSelection() local 102 needToRefreshSelectOverlay_ = textWidth > 0; in ProcessSelection() 103 UpdateSelection(std::clamp(selectController_->GetStartIndex(), 0, textWidth), in ProcessSelection() 104 std::clamp(selectController_->GetEndIndex(), 0, textWidth)); in ProcessSelection() 106 if (isTextChangedAtCreation_ && textWidth == 0) { in ProcessSelection()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/ndk/ |
H A D | drawing_font_test.cpp | 367 float textWidth = 0.f; in HWTEST_F() local 370 OH_Drawing_TextEncoding::TEXT_ENCODING_UTF8, nullptr, &textWidth); in HWTEST_F() 372 EXPECT_EQ(textWidth, 0.f); in HWTEST_F() 374 nullptr, &textWidth); in HWTEST_F() 376 EXPECT_EQ(textWidth, 0.f); in HWTEST_F() 378 nullptr, &textWidth); in HWTEST_F() 380 EXPECT_EQ(textWidth, 254.0); // 254.0 is textWidth in HWTEST_F() 398 float textWidth = 0.f; in HWTEST_F() local 400 drawingErrorCode = OH_Drawing_FontMeasureSingleCharacter(nullptr, strOne, &textWidth); in HWTEST_F() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/navigation/ |
H A D | bar_item_layout_algorithm.cpp | 51 auto textWidth = textWrapper->GetGeometryNode()->GetContentSize().Width(); in MeasureToolbarItemText() local 54 if (GreatOrEqual(textWidth, constraint.maxSize.Width())) { in MeasureToolbarItemText() 55 constraint.maxSize.SetWidth(textWidth); in MeasureToolbarItemText() 126 auto textWidth = geometryNode->GetFrameSize().Width(); in LayoutText() local 127 auto offsetX = (constraint->maxSize.Width() - textWidth) / 2; in LayoutText()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/marquee/ |
H A D | marquee_pattern.cpp | 175 auto textWidth = GetTextNodeWidth(); in PlayMarqueeAnimation() local 177 if (GreatNotEqual(step, textWidth)) { in PlayMarqueeAnimation() 206 "Play Marquee Animation, marqueeNodeId is %{public}d, textNodeId is %{public}d, textWidth is %{public}f, " in PlayMarqueeAnimation() 208 host->GetId(), textNode->GetId(), textWidth, duration); in PlayMarqueeAnimation() 456 auto textWidth = textGeoNode->GetFrameSize().Width(); in CalculateStart() local 472 start = (marqueeSize.Width() + textWidth) * HALF; in CalculateStart() 474 start = textWidth + padding.right.value_or(0); in CalculateStart() 478 start = -1 * textWidth - padding.left.value_or(0); in CalculateStart() 480 start = -1 * (marqueeSize.Width() + textWidth) * HALF; in CalculateStart() 500 auto textWidth in CalculateEnd() local 609 auto textWidth = textGeoNode->GetFrameSize().Width(); IsRunMarquee() local [all...] |
/foundation/arkui/ui_lite/frameworks/components/ |
H A D | ui_label.cpp | 49 void UpdateWidth(uint16_t textWidth, uint16_t labelWidth) in UpdateWidth() argument 51 textX_ = textWidth; in UpdateWidth() 363 void UILabel::RemeasureForMarquee(int16_t textWidth) in RemeasureForMarquee() argument 366 if (textWidth > rectWidth) { in RemeasureForMarquee() 374 static_cast<LabelAnimator*>(animator_.animator)->UpdateWidth(textWidth, rectWidth); in RemeasureForMarquee() 376 LabelAnimator* animator = new LabelAnimator(textWidth, rectWidth, offsetX_, this); in RemeasureForMarquee()
|
H A D | ui_dialog.cpp | 415 uint16_t textWidth = 0; in MeasureMaxWidth() local 423 textWidth = MeasureTextWidth(); in MeasureMaxWidth() 424 textWidth += 2 * PADDING; // 2: there are 2 paddings horizontally in MeasureMaxWidth() 431 return MATH_MAX(titleWidth, MATH_MAX(textWidth, buttonTotalWidth)); in MeasureMaxWidth() 451 uint16_t textWidth = 0; in MeasureTextWidth() local 459 textWidth = text_->GetTextWidth(); in MeasureTextWidth() 462 textWidth = widthMaxNoPadding; in MeasureTextWidth() 465 return textWidth; in MeasureTextWidth()
|
H A D | ui_edit_text.cpp | 629 uint16_t textWidth = GetTextWidthByCursorIndex(cursorIndex_); in UpdateOffsetBySetCursorIndex() local 633 newPosX = contentRect.GetX() + textWidth + offsetX_; in UpdateOffsetBySetCursorIndex() 635 offsetX_ = -(textWidth - DEFAULT_TEXT_OFFSET); in UpdateOffsetBySetCursorIndex() 637 offsetX_ = -(textWidth - GetRect().GetWidth() + BOTH_SIDE_TEXT_OFFSET); in UpdateOffsetBySetCursorIndex()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/text/ |
H A D | font.cpp | 186 scalar textWidth = 0.0f; in MeasureSingleCharacter() local 189 textWidth = MeasureText(&glyph, sizeof(uint16_t), TextEncoding::GLYPH_ID); in MeasureSingleCharacter() 194 textWidth = fallbackFont->MeasureText(&fallbackGlyph, sizeof(uint16_t), TextEncoding::GLYPH_ID); in MeasureSingleCharacter() 197 return textWidth; in MeasureSingleCharacter()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/src/ |
H A D | drawing_font.cpp | 237 float* textWidth) in OH_Drawing_FontMeasureSingleCharacter() 239 if (cFont == nullptr || str == nullptr || textWidth == nullptr) { in OH_Drawing_FontMeasureSingleCharacter() 248 *textWidth = CastToFont(*cFont).MeasureSingleCharacter(unicode); in OH_Drawing_FontMeasureSingleCharacter() 253 OH_Drawing_TextEncoding encoding, OH_Drawing_Rect* bounds, float* textWidth) in OH_Drawing_FontMeasureText() 255 if (cFont == nullptr || text == nullptr || byteLength == 0 || textWidth == nullptr) { in OH_Drawing_FontMeasureText() 259 *textWidth = CastToFont(*cFont).MeasureText(text, byteLength, in OH_Drawing_FontMeasureText() 236 OH_Drawing_FontMeasureSingleCharacter(const OH_Drawing_Font* cFont, const char* str, float* textWidth) OH_Drawing_FontMeasureSingleCharacter() argument 252 OH_Drawing_FontMeasureText(const OH_Drawing_Font* cFont, const void* text, size_t byteLength, OH_Drawing_TextEncoding encoding, OH_Drawing_Rect* bounds, float* textWidth) OH_Drawing_FontMeasureText() argument
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/include/ |
H A D | drawing_font.h | 249 * @param textWidth Indicates the width of the single character. 253 * and textWidth is nullptr or strlen(str) is 0. 258 float* textWidth); 269 * @param textWidth Indicates the width of text. 273 * and textWidth is nullptr or byteLength is 0. 278 OH_Drawing_TextEncoding encoding, OH_Drawing_Rect* bounds, float* textWidth);
|
/foundation/arkui/ace_engine/frameworks/core/components/marquee/ |
H A D | render_marquee.cpp | 372 auto textWidth = childText_->GetLayoutSize().Width(); in GetTextPosition() local 374 if (GreatOrEqual(textWidth, marqueeWidth)) { in GetTextPosition() 389 return Offset((marqueeWidth - textWidth) / HALF_DIVIDE, 0.0); in GetTextPosition() 391 return Offset(marqueeWidth - textWidth, 0.0); in GetTextPosition()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/ndk/ndkfont_fuzzer/ |
H A D | ndkfont_fuzzer.cpp | 220 float textWidth; in NativeDrawingFontTest006() local 233 OH_Drawing_FontMeasureText(font, str, strlen(str), TEXT_ENCODING_UTF8, nullptr, &textWidth); in NativeDrawingFontTest006() 234 OH_Drawing_FontMeasureText(nullptr, str, strlen(str), TEXT_ENCODING_UTF8, nullptr, &textWidth); in NativeDrawingFontTest006()
|
/foundation/arkui/ace_engine/advanced_ui_component/counter/interfaces/ |
H A D | counter.js | 297 this.__textWidth = new ObservedPropertySimplePU(0, this, "textWidth"); 430 if (v20.textWidth !== undefined) { 431 this.textWidth = v20.textWidth; 875 get textWidth() { 879 set textWidth(j19) { 934 if (this.numberStyleOptions.textWidth !== undefined) { 935 this.textWidth = this.numberStyleOptions.textWidth; 936 if (this.textWidth < [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/security_component/ |
H A D | security_component_layout_algorithm.cpp | 161 double textWidth = text_.width_; in ShrinkWidth() local 164 if (GreatNotEqual(textWidth, iconWidth)) { in ShrinkWidth() 166 double iconRemain = (remain - textRemain) * iconWidth / textWidth; in ShrinkWidth() 170 double textRemain = (remain - iconRemain) * textWidth / iconWidth; in ShrinkWidth() 175 double iconRemain = iconWidth * remain / (iconWidth + textWidth); in ShrinkWidth() 176 double textRemain = textWidth * remain / (iconWidth + textWidth); in ShrinkWidth()
|
/foundation/arkui/ui_lite/interfaces/kits/components/ |
H A D | ui_label.h | 465 void RemeasureForMarquee(int16_t textWidth);
|
H A D | ui_edit_text.h | 390 void RemeasureForMarquee(int16_t textWidth);
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text_field/ |
H A D | content_controller.cpp | 198 auto textWidth = static_cast<int32_t>(GetWideText().length()); in FilterValue() local 199 if (GreatNotEqual(textWidth, maxLength)) { in FilterValue()
|
/foundation/arkui/ace_engine/interfaces/napi/kits/measure/ |
H A D | js_measure.cpp | 220 double textWidth = delegate->MeasureText(context); in JSMeasureText() local 221 napi_create_double(env, textWidth, &result); in JSMeasureText()
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/components/test/unittest/common/ |
H A D | text_tdd_test.cpp | 155 int textWidth = 0; in ComponentTextStyleSetOverflowTest003() local 157 JerrySetNumberProperty(styleObj_, width, textWidth); in ComponentTextStyleSetOverflowTest003()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/calendar/ |
H A D | calendar_paint_method.cpp | 90 double textWidth = paragraph->GetMaxIntrinsicWidth(); in DrawCalendarText() local 93 double textPaintOffsetX = (boxRect.Width() - textWidth) / 2.0; in DrawCalendarText() 96 textRect.SetRect(offset.GetX() + textPaintOffsetX, offset.GetY() + textPaintOffsetY, textWidth, textHeight); in DrawCalendarText()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/toast/ |
H A D | toast_pattern.cpp | 173 auto textWidth = text->GetGeometryNode()->GetMarginFrameSize().Width(); in GetOffsetX() local 181 offsetX = Dimension(rootWidth - textWidth); in GetOffsetX() 183 offsetX = Dimension((rootWidth - textWidth) / 2.0f); in GetOffsetX()
|
/foundation/arkui/ui_lite/frameworks/common/ |
H A D | text.cpp | 535 int16_t textWidth = TypedText::GetTextWidth(text_, fontId_, fontSize_, GetTextStrLen(), in GetPosXByLetterIndex() local 538 return static_cast<uint16_t>(textWidth > maxWidth ? maxWidth : textWidth); in GetPosXByLetterIndex()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/manager/drag_drop/utils/ |
H A D | drag_animation_helper.cpp | 356 int64_t textWidth = BADGE_DEFAULT_SIZE.ConvertToPx() + (BADGE_RELATIVE_OFFSET.ConvertToPx() * (badgeLength - 1)); in UpdateBadgeLayoutAndRenderContext() local 357 auto textSize = CalcSize(NG::CalcLength(textWidth), NG::CalcLength(BADGE_DEFAULT_SIZE.ConvertToPx())); in UpdateBadgeLayoutAndRenderContext()
|
/foundation/arkui/ace_engine/frameworks/core/components/calendar/ |
H A D | rosen_render_calendar.cpp | 90 double textWidth = paragraph->GetMaxIntrinsicWidth(); in GetTextParagraph() local 93 double textPaintOffsetX = (boxRect.Width() - textWidth) / 2.0; in GetTextParagraph() 96 textRect.SetRect(offset.GetX() + textPaintOffsetX, offset.GetY() + textPaintOffsetY, textWidth, textHeight); in GetTextParagraph()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/ |
H A D | text_content_modifier.cpp | 1005 float textWidth = paragraph->GetTextWidth(); in ResetTextRacePercent() local 1007 (textRaceSpaceWidth_ + textRectWidth) / (textWidth + textRaceSpaceWidth_) * in ResetTextRacePercent()
|