Home
last modified time | relevance | path

Searched refs:lineHeight (Results 1 - 25 of 55) sorted by relevance

123

/foundation/arkui/ui_lite/frameworks/common/
H A Dtext.cpp276 int16_t lineHeight = style.lineHeight_; in Draw() local
282 CalculatedCurLineHeight(lineHeight, curLineHeight, fontHeight, style, lineMaxHeight); in Draw()
283 Point pos = GetPos(lineHeight, style, lineCount, coords); in Draw()
303 curLineHeight = lineHeight; in Draw()
309 if (lineHeight != style.lineHeight_) { in Draw()
333 tempLetterIndex, lineHeight, lineBegin, i); in Draw()
338 void Text::CalculatedCurLineHeight(int16_t& lineHeight, int16_t& curLineHeight, in CalculatedCurLineHeight() argument
341 if (lineHeight <= 0) { in CalculatedCurLineHeight()
342 lineHeight = fontHeight; in CalculatedCurLineHeight()
343 lineHeight in CalculatedCurLineHeight()
353 GetPos(int16_t& lineHeight, const Style& style, uint16_t& lineCount, const Rect& coords) GetPos() argument
377 SetNextLineBegin(const Style& style, uint16_t lineMaxHeight, int16_t& curLineHeight, Point& pos, int16_t& tempLetterIndex, int16_t& lineHeight, uint16_t& lineBegin, uint16_t letterIndex) SetNextLineBegin() argument
475 int16_t lineHeight = 0; GetTextLine() local
519 int16_t lineHeight = style.lineHeight_; GetLetterIndexByLinePosition() local
548 int16_t lineHeight = style.lineHeight_; GetLetterIndexByPosition() local
[all...]
H A Dtyped_text.cpp29 int16_t lineHeight, int16_t maxWidth, int8_t lineSpace, SpannableString* spannableString, in GetTextSize()
41 bool hasLineHeight = (lineHeight != 0); in GetTextSize()
53 curLineHeight = lineHeight; in GetTextSize()
68 size.y += lineHeight; in GetTextSize()
76 size.y = lineHeight; in GetTextSize()
28 GetTextSize(const char* text, uint16_t fontId, uint8_t fontSize, int16_t letterSpace, int16_t lineHeight, int16_t maxWidth, int8_t lineSpace, SpannableString* spannableString, bool eliminateTrailingSpaces) GetTextSize() argument
H A Dtyped_text.h46 int16_t lineHeight,
/foundation/arkui/ace_engine/frameworks/core/components_ng/render/
H A Ddrawing_prop_convertor.cpp304 double lineHeight = textStyle.GetLineHeight().Value(); in ToRSTextStyle() local
306 lineHeight = context->NormalizeToPx(textStyle.GetLineHeight()); in ToRSTextStyle()
313 if (!NearEqual(lineHeight, fontSize) && (lineHeight > 0.0) && (!NearZero(fontSize))) { in ToRSTextStyle()
315 rsTextStyle.height_ = lineHeight / fontSize; in ToRSTextStyle()
317 rsTextStyle.heightScale = lineHeight / fontSize; in ToRSTextStyle()
327 if (NearZero(lineHeight) || (!isBeginVersion && NearEqual(lineHeight, fontSize))) { in ToRSTextStyle()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/
H A Dgrid_layout_base_algorithm.cpp41 const float lineHeight = lineHeightIter->second; in AdjustChildrenHeight() local
60 if (GreatOrEqual(childFrameSize.MainSize(gridLayoutInfo_.axis_), lineHeight)) { in AdjustChildrenHeight()
63 childConstraint->selfIdealSize.SetMainSize(lineHeight, gridLayoutInfo_.axis_); in AdjustChildrenHeight()
H A Dgrid_layout_info.cpp255 float lineHeight = GetTotalLineHeight(0.0f) / static_cast<float>(lineHeightMap_.size()); in GetContentHeightOfRegularGrid() local
259 res += (it != lineHeightMap_.end() ? it->second : lineHeight) + mainGap; in GetContentHeightOfRegularGrid()
265 return res + (lastLine != lineHeightMap_.end() ? lastLine->second : lineHeight); in GetContentHeightOfRegularGrid()
307 inline float AddLinesInBetween(int32_t prevIdx, int32_t idx, int32_t crossCount, float lineHeight) in AddLinesInBetween() argument
312 return (idx - prevIdx) > 1 ? ((idx - 2 - prevIdx) / crossCount + 1) * lineHeight : 0.0f; in AddLinesInBetween()
520 for (auto [lineIndex, lineHeight] : lineHeightMap_) { in GetTotalHeightFromZeroIndex()
522 targetPos += lineHeight + mainGap; in GetTotalHeightFromZeroIndex()
/foundation/arkui/ace_engine/frameworks/bridge/cj_frontend/interfaces/cj_ffi/measure/
H A Dcj_measure_ffi.cpp82 if (context.lineHeight.hasValue) { in FromCJCreateMeasureContext()
83 measureContext.lineHeight = Dimension( in FromCJCreateMeasureContext()
84 context.lineHeight.value.value, in FromCJCreateMeasureContext()
85 DimensionUnit(context.lineHeight.value.unitType) in FromCJCreateMeasureContext()
H A Dcj_measure_ffi.h35 NativeOptionLength lineHeight; member
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/rich_editor/
H A Dselection_info.h73 double lineHeight = 0.0; member
86 lineHeight = style.GetLineHeight().ConvertToPx(); in SymbolSpanStyle()
107 && lineHeight == rhs.lineHeight in operator ==()
127 double lineHeight = 0.0; member
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/grid_scroll/
H A Dgrid_scroll_layout_algorithm.cpp148 auto lineHeight = gridLayoutInfo_.GetAverageLineHeight(); in UpdateOffsetOnVirtualKeyboardHeightChange() local
149 if (GreatNotEqual(lineHeight, 0)) { in UpdateOffsetOnVirtualKeyboardHeightChange()
150 offset = floor(offset / lineHeight) * lineHeight; in UpdateOffsetOnVirtualKeyboardHeightChange()
237 float lineHeight = gridLayoutInfo_.lineHeightMap_[line->first]; in Layout() local
272 SizeF blockSize = SizeF(frSize->second, lineHeight, axis_); in Layout()
446 auto lineHeight = FillNewLineBackward(crossSize, mainSize, layoutWrapper, false); in ReloadToStartIndex() local
447 if (LessNotEqual(lineHeight, 0.0)) { in ReloadToStartIndex()
475 auto lineHeight = FillNewLineBackward(crossSize, mainSize, layoutWrapper, false); in ReloadFromUpdateIdxToStartIndex() local
476 if (LessNotEqual(lineHeight, 0. in ReloadFromUpdateIdxToStartIndex()
502 float lineHeight = FillNewLineForward(crossSize, mainSize, layoutWrapper); FillBlankAtStart() local
538 float lineHeight = FillNewLineForward(crossSize, mainSize, layoutWrapper); FillOneLineForwardWithoutUpdatingStartIndex() local
655 float lineHeight = FillNewLineBackward(crossSize, mainSize, layoutWrapper, false); FillBlankAtEnd() local
1007 OneLineMovesOffViewportFromAbove(float mainLength, float lineHeight) OneLineMovesOffViewportFromAbove() argument
1121 auto lineHeight = gridLayoutInfo_.lineHeightMap_.find(gridLayoutInfo_.startMainLineIndex_ - 1); SkipForwardLines() local
1164 auto lineHeight = gridLayoutInfo_.lineHeightMap_.find(gridLayoutInfo_.endMainLineIndex_ + 1); SkipBackwardLines() local
1192 auto lineHeight = gridLayoutInfo_.GetAverageLineHeight() + mainGap_; SkipRegularLines() local
1835 float lineHeight = 0.0f; SupplyAllData2ZeroIndex() local
1842 auto lineHeight = 0.f; SupplyAllData2ZeroIndex() local
1884 float lineHeight = FillNewCacheLineBackward(crossSize, mainSize, layoutWrapper, currentMainLineIndex_); FillCacheLineAtEnd() local
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/font/
H A Dconstants_converter.cpp553 double lineHeight = textStyle.GetLineHeight().Value(); in ConvertTxtStyle() local
555 lineHeight = pipelineContext->NormalizeToPx(textStyle.GetLineHeight()); in ConvertTxtStyle()
558 if (!NearEqual(lineHeight, fontSize) && (lineHeight > 0.0) && (!NearZero(fontSize))) { in ConvertTxtStyle()
559 txtStyle.height = lineHeight / fontSize; in ConvertTxtStyle()
564 if (NearZero(lineHeight) || (!isBeginVersion && NearEqual(lineHeight, fontSize))) { in ConvertTxtStyle()
673 double lineHeight = textStyle.GetLineHeight().Value(); in ConvertTxtStyle() local
675 lineHeight = NormalizeToPx(textStyle.GetLineHeight()); in ConvertTxtStyle()
678 if (!NearEqual(lineHeight, fontSiz in ConvertTxtStyle()
781 double lineHeight = textStyle.GetLineHeight().Value(); ConvertTxtStyle() local
[all...]
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text_drag/
H A Dtext_drag_pattern.cpp174 auto lineHeight = GetLineHeight(); in GenerateClipPath() local
178 path->LineTo(endX, endY + lineHeight); in GenerateClipPath()
179 path->LineTo(startX, endY + lineHeight); in GenerateClipPath()
189 path->LineTo(textStart, startY + lineHeight); in GenerateClipPath()
190 path->LineTo(startX, startY + lineHeight); in GenerateClipPath()
226 auto lineHeight = GetLineHeight(); in GenerateBackgroundPoints() local
235 points.push_back(TextPoint(endX + offset, endY + lineHeight + offset)); in GenerateBackgroundPoints()
236 points.push_back(TextPoint(startX - offset, endY + lineHeight + offset)); in GenerateBackgroundPoints()
254 points.push_back(TextPoint(textStart - offset, startY + lineHeight - offset)); in GenerateBackgroundPoints()
255 points.push_back(TextPoint(startX - offset, startY + lineHeight in GenerateBackgroundPoints()
[all...]
H A Dtext_drag_pattern.h54 TextDragData(RectF textRect, float frameWidth, float frameHeight, float lineHeight, float lastLineHeight) in TextDragData()
55 : textRect_(textRect), frameWidth_(frameWidth), frameHeight_(frameHeight), lineHeight_(lineHeight), in TextDragData()
224 void SetLastLineHeight(float lineHeight) in SetLastLineHeight() argument
226 lastLineHeight_ = lineHeight; in SetLastLineHeight()
/foundation/graphic/graphic_utils_lite/test/
H A Dstyle_unit_test.cpp349 const int16_t lineHeight = 10; in HWTEST_F() local
350 style_->SetStyle(STYLE_LINE_HEIGHT, lineHeight); in HWTEST_F()
351 EXPECT_EQ(style_->GetStyle(STYLE_LINE_HEIGHT), lineHeight); in HWTEST_F()
/foundation/arkui/ace_engine/frameworks/bridge/cj_frontend/interfaces/cj_ffi/
H A Dcj_text_ffi.cpp103 void FfiOHOSAceFrameworkTextSetLineHeight(double lineHeight, int32_t unit) in FfiOHOSAceFrameworkTextSetLineHeight() argument
105 Dimension dimValue(lineHeight, static_cast<DimensionUnit>(unit)); in FfiOHOSAceFrameworkTextSetLineHeight()
H A Dcj_text_ffi.h37 CJ_EXPORT void FfiOHOSAceFrameworkTextSetLineHeight(double lineHeight, int32_t unit);
/foundation/arkui/ace_engine/frameworks/base/utils/
H A Dmeasure_util.h34 std::optional<Dimension> lineHeight = std::nullopt; member
/foundation/arkui/ui_lite/interfaces/kits/common/
H A Dtext.h631 void CalculatedCurLineHeight(int16_t& lineHeight, int16_t& curLineHeight,
634 int16_t& tempLetterIndex, int16_t& lineHeight, uint16_t& lineBegin, uint16_t letterIndex);
635 Point GetPos(int16_t& lineHeight, const Style& style, uint16_t& lineCount, const Rect& coords);
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/
H A Dtext_adapt_font_sizer.cpp154 void TextAdaptFontSizer::SetAdaptFontSizeLineHeight(const Dimension& lineHeight, const TextStyle& textStyle) in SetAdaptFontSizeLineHeight() argument
156 lineHeight_ = lineHeight.ConvertToPxDistribute( in SetAdaptFontSizeLineHeight()
H A Dtext_adapt_font_sizer.h58 void SetAdaptFontSizeLineHeight(const Dimension& lineHeight, const TextStyle& textStyle);
/foundation/arkui/ace_engine/interfaces/napi/kits/measure/
H A Djs_measure.cpp272 napi_get_named_property(env, argv, "lineHeight", &contextParamMap["lineHeightNApi"]); in SetMeasureTextNapiProperty()
294 std::optional<Dimension> lineHeight = in SetContextProperty() local
330 context.lineHeight = lineHeight; in SetContextProperty()
/foundation/arkui/ace_engine_lite/frameworks/src/core/components/test/unittest/common/
H A Dtext_tdd_test.cpp423 * @tc.expected: step2. set lineHeight = 50, check uikit uilabel lineHeight == expectLineHeight in ComponentTextStyleSetLineHeightTest008()
425 const char *lineHeight = "lineHeight"; in ComponentTextStyleSetLineHeightTest008() local
426 int64_t expectLineHeight = 50; // 50: expect lineHeight in ComponentTextStyleSetLineHeightTest008()
427 jerry_value_t lineHeightKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(lineHeight)); in ComponentTextStyleSetLineHeightTest008()
440 * @tc.expected: step3. update lineHeight = 30, check uikit uilabel lineHeight == expectLineHeight in ComponentTextStyleSetLineHeightTest008()
442 expectLineHeight = 30; // 30: expect lineHeight update in ComponentTextStyleSetLineHeightTest008()
443 UpdateNumAttributeOrStyleValue(textComponent, lineHeight, expectLineHeigh in ComponentTextStyleSetLineHeightTest008()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components_v2/inspector/
H A Dtext_composed_element.cpp30 { "lineHeight", [](const TextComposedElement& inspector) { return inspector.GetLineHeight(); } },
50 DumpLog::GetInstance().AddDesc(std::string("lineHeight: ").append(GetLineHeight())); in Dump()
96 auto lineHeight = in GetLineHeight() local
98 return lineHeight.ToString(); in GetLineHeight()
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsi/nativeModule/
H A Darkts_native_span_bridge.cpp192 CalcDimension lineHeight(0.0, DimensionUnit::PX); in SetLineHeight()
193 if (!ArkTSUtils::ParseJsDimensionFpNG(vm, secondArg, lineHeight) || lineHeight.IsNegative()) { in SetLineHeight()
194 lineHeight.Reset(); in SetLineHeight()
197 nativeNode, lineHeight.Value(), static_cast<int8_t>(lineHeight.Unit())); in SetLineHeight()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/span/
H A Dspan_object.cpp754 LineHeightSpan::LineHeightSpan(Dimension lineHeight) : SpanBase(0, 0), lineHeight_(lineHeight) {} in LineHeightSpan() argument
756 LineHeightSpan::LineHeightSpan(Dimension lineHeight, int32_t start, int32_t end) in LineHeightSpan() argument
757 : SpanBase(start, end), lineHeight_(lineHeight) in LineHeightSpan()
815 auto lineHeight = lineHeightSpan->GetLineHeight(); in IsAttributesEqual() local
816 return lineHeight_ == lineHeight; in IsAttributesEqual()

Completed in 20 milliseconds

123