Home
last modified time | relevance | path

Searched refs:textWidth (Results 1 – 25 of 54) sorted by relevance

123

/ohos5.0/docs/zh-cn/application-dev/performance/
H A Danimation_practice.md107 @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 Ddrawing_font_test.cpp365 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 Danimation_practice.md110 @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 Dsearch_text_field.cpp103 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 Dmarquee_pattern.cpp196 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 Ddrawing_font.cpp234 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 Dbar_item_layout_algorithm.cpp62 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 Dui_label.cpp49 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 Dui_dialog.cpp415 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 Dui_edit_text.cpp629 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 Dfont.cpp186 scalar textWidth = 0.0f; in MeasureSingleCharacter() local
189 textWidth = MeasureText(&glyph, sizeof(uint16_t), TextEncoding::GLYPH_ID); in MeasureSingleCharacter()
194textWidth = 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 Dutils.ets43 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 Darkts-animatable-extend.md55 @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 Darkts-custom-attribute-animation.md23 @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 Ddrawing_font.h258 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 Drender_marquee.cpp372 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 Dndkfont_fuzzer.cpp220 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 Darkts-animatable-extend.md54 @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 Darkts-custom-attribute-animation.md23 @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 Dohos-arkui-advanced-Counter.md108 | textWidth | number | 否 | 设置数值文本的宽度。<br/>默认值:0 |
275 textWidth: 100,
373 textWidth: 100,
/ohos5.0/foundation/arkui/ace_engine/advanced_ui_component/counter/interfaces/
H A Dcounter.js432 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 Dsecurity_component_layout_algorithm.cpp170 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 Djs-apis-measure.md58 @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 Ddrawing__font_8h.md48 …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 Dboot_compile_progress.cpp222 …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()

123