/ohos5.0/docs/zh-cn/application-dev/performance/ |
H A D | animation_practice.md | 107 @State textWidth: number = 10; 116 .width(this.textWidth) 192 this.textWidth = (this.textWidth === 100 ? 200 : 100); 205 .width(this.textWidth) 231 this.textWidth = (this.textWidth === 100 ? 200 : 100); 239 .width(this.textWidth) 274 .width(this.textWidth) 280 this.textWidth = 100; 318 .width(this.textWidth) 325 this.textWidth = (this.textWidth === 100 ? 200 : 100); [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/ndk/ |
H A D | drawing_font_test.cpp | 365 float textWidth = 0.f; variable 370 EXPECT_EQ(textWidth, 0.f); 374 EXPECT_EQ(textWidth, 0.f); 378 EXPECT_EQ(textWidth, 254.0); // 254.0 is textWidth 396 float textWidth = 0.f; variable 400 EXPECT_EQ(textWidth, 0.f); 403 EXPECT_EQ(textWidth, 0.f); 406 EXPECT_EQ(textWidth, 0.f); 410 EXPECT_EQ(textWidth, 0.f); 413 EXPECT_TRUE(textWidth > 0); [all …]
|
/ohos5.0/docs/en/application-dev/performance/ |
H A D | animation_practice.md | 110 @State textWidth: number = 10; 119 .width(this.textWidth) 195 this.textWidth = (this.textWidth === 100 ? 200 : 100); 208 .width(this.textWidth) 234 this.textWidth = (this.textWidth === 100 ? 200 : 100); 242 .width(this.textWidth) 277 .width(this.textWidth) 283 this.textWidth = 100; 321 .width(this.textWidth) 328 this.textWidth = (this.textWidth === 100 ? 200 : 100); [all …]
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/search/ |
H A D | search_text_field.cpp | 103 auto textWidth = static_cast<int32_t>(contentController_->GetWideText().length()); in ProcessSelection() local 105 needToRefreshSelectOverlay_ = textWidth > 0; in ProcessSelection() 106 UpdateSelection(std::clamp(selectController_->GetStartIndex(), 0, textWidth), in ProcessSelection() 107 std::clamp(selectController_->GetEndIndex(), 0, textWidth)); in ProcessSelection() 109 if (isTextChangedAtCreation_ && textWidth == 0) { in ProcessSelection()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/marquee/ |
H A D | marquee_pattern.cpp | 196 auto textWidth = GetTextNodeWidth(); in PlayMarqueeAnimation() local 198 if (GreatNotEqual(step, textWidth)) { in PlayMarqueeAnimation() 229 host->GetId(), textNode->GetId(), textWidth, duration); in PlayMarqueeAnimation() 480 auto textWidth = textGeoNode->GetFrameSize().Width(); in CalculateStart() local 494 start = (marqueeSize.Width() + textWidth) * HALF; in CalculateStart() 496 start = textWidth + padding.right.value_or(0); in CalculateStart() 522 auto textWidth = textGeoNode->GetFrameSize().Width(); in CalculateEnd() local 534 end = -1 * textWidth - padding.left.value_or(0); in CalculateEnd() 544 end = (marqueeSize.Width() + textWidth) * HALF; in CalculateEnd() 546 end = textWidth + padding.right.value_or(0); in CalculateEnd() [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/src/ |
H A D | drawing_font.cpp | 234 float* textWidth) in OH_Drawing_FontMeasureSingleCharacter() argument 236 if (cFont == nullptr || str == nullptr || textWidth == nullptr) { in OH_Drawing_FontMeasureSingleCharacter() 245 *textWidth = CastToFont(*cFont).MeasureSingleCharacter(unicode); in OH_Drawing_FontMeasureSingleCharacter() 250 OH_Drawing_TextEncoding encoding, OH_Drawing_Rect* bounds, float* textWidth) in OH_Drawing_FontMeasureText() argument 252 if (cFont == nullptr || text == nullptr || byteLength == 0 || textWidth == nullptr) { in OH_Drawing_FontMeasureText() 256 *textWidth = CastToFont(*cFont).MeasureText(text, byteLength, in OH_Drawing_FontMeasureText()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/navigation/ |
H A D | bar_item_layout_algorithm.cpp | 62 auto textWidth = textWrapper->GetGeometryNode()->GetContentSize().Width(); in MeasureToolbarItemText() local 65 if (GreatOrEqual(textWidth, constraint.maxSize.Width())) { in MeasureToolbarItemText() 66 constraint.maxSize.SetWidth(textWidth); in MeasureToolbarItemText() 137 auto textWidth = geometryNode->GetFrameSize().Width(); in LayoutText() local 138 auto offsetX = (constraint->maxSize.Width() - textWidth) / 2; in LayoutText()
|
/ohos5.0/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()
|
/ohos5.0/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()
|
/ohos5.0/base/notification/distributed_notification_service/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/common/ |
H A D | utils.ets | 43 let textWidth = px2vp(measureUtils.measureText(options)); 44 let ratio = (textWidth % containerWidth) / containerWidth; 45 let crossLineFlag: boolean = textWidth > containerWidth;
|
/ohos5.0/docs/zh-cn/application-dev/quick-start/ |
H A D | arkts-animatable-extend.md | 55 @State textWidth: number = 80; 60 .animatableWidth(this.textWidth) 64 this.textWidth = this.textWidth == 80 ? 160 : 80;
|
/ohos5.0/docs/zh-cn/application-dev/ui/ |
H A D | arkts-custom-attribute-animation.md | 23 @State textWidth: number = 80; 28 .animatableWidth(this.textWidth)// 第二步:将自定义可动画属性接口设置到组件上 32 this.textWidth = this.textWidth == 80 ? 160 : 80;// 第四步:改变自定义可动画属性的参数,产生动画
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/include/ |
H A D | drawing_font.h | 258 float* textWidth); 278 OH_Drawing_TextEncoding encoding, OH_Drawing_Rect* bounds, float* textWidth);
|
/ohos5.0/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()
|
/ohos5.0/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()
|
/ohos5.0/docs/en/application-dev/quick-start/ |
H A D | arkts-animatable-extend.md | 54 @State textWidth: number = 80; 59 .animatableWidth(this.textWidth) 63 this.textWidth = this.textWidth == 80 ? 160 : 80;
|
/ohos5.0/docs/en/application-dev/ui/ |
H A D | arkts-custom-attribute-animation.md | 23 @State textWidth: number = 80; 28 ….animatableWidth(this.textWidth)// Step 2: Set the custom animatable property API on the component. 32 …this.textWidth = this.textWidth == 80 ? 160 : 80;// Change the parameters of the custom animatable…
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ |
H A D | ohos-arkui-advanced-Counter.md | 108 | textWidth | number | 否 | 设置数值文本的宽度。<br/>默认值:0 | 275 textWidth: 100, 373 textWidth: 100,
|
/ohos5.0/foundation/arkui/ace_engine/advanced_ui_component/counter/interfaces/ |
H A D | counter.js | 432 if (v20.textWidth !== undefined) { 433 this.textWidth = v20.textWidth; 877 get textWidth() { 881 set textWidth(j19) { 947 if (this.numberStyleOptions.textWidth !== undefined) { 948 this.textWidth = this.numberStyleOptions.textWidth; 949 if (this.textWidth < 0) { 950 this.textWidth = 0; 1019 this.textWidth = this.inlineStyleOptions.textWidth; 1020 if (this.textWidth < 0) { [all …]
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/security_component/ |
H A D | security_component_layout_algorithm.cpp | 170 double textWidth = text_.width_; in ShrinkWidth() local 173 if (GreatNotEqual(textWidth, iconWidth)) { in ShrinkWidth() 175 double iconRemain = (remain - textRemain) * iconWidth / textWidth; in ShrinkWidth() 179 double textRemain = (remain - iconRemain) * textWidth / iconWidth; in ShrinkWidth() 184 double iconRemain = iconWidth * remain / (iconWidth + textWidth); in ShrinkWidth() 185 double textRemain = textWidth * remain / (iconWidth + textWidth); in ShrinkWidth()
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-arkui/ |
H A D | js-apis-measure.md | 58 @State textWidth: number = MeasureText.measureText({ 67 Text(`The width of 'Hello World': ${this.textWidth}`)
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-arkgraphics2d/ |
H A D | drawing__font_8h.md | 48 …ng_Font](_drawing.md#oh_drawing_font) \*font, const char \*str, float \*textWidth) | 用于测量单个字符的宽度。当… 49 …oding, [OH_Drawing_Rect](_drawing.md#oh_drawing_rect) \*bounds, float \*textWidth) | 用于获取文本的宽度和边界框…
|
/ohos5.0/foundation/graphic/graphic_2d/frameworks/bootanimation/src/ |
H A D | boot_compile_progress.cpp | 222 …auto textWidth = font.MeasureText(info, strlen(info), Rosen::Drawing::TextEncoding::UTF8, nullptr); in DrawCompileProgress() local 223 float scalarX = windowWidth_ / NUMBER_TWO - textWidth / NUMBER_TWO; in DrawCompileProgress()
|