/foundation/graphic/graphic_2d/rosen/test/2d_engine/unittest/rosen_text/adapter/skia_txt/ |
H A D | typography_test.cpp | 18 #include "typography.h" 42 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); in HWTEST_F() local 43 EXPECT_EQ(typography->GetMaxWidth(), 0); in HWTEST_F() 57 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); in HWTEST_F() local 58 EXPECT_EQ(typography->GetHeight(), 0); in HWTEST_F() 59 EXPECT_EQ(typography->GetActualWidth(), 0); in HWTEST_F() 73 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); in HWTEST_F() local 74 EXPECT_EQ(typography->GetActualWidth(), 0); in HWTEST_F() 75 EXPECT_EQ(typography->GetMaxIntrinsicWidth(), 0); in HWTEST_F() 80 * @tc.desc: test for get min intrinsic width for typography 89 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); HWTEST_F() local 104 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); HWTEST_F() local 128 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); HWTEST_F() local 164 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); HWTEST_F() local 207 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); HWTEST_F() local [all...] |
H A D | typography_create_test.cpp | 66 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate->CreateTypography(); in HWTEST_F() local 67 EXPECT_EQ(typography != nullptr, true); in HWTEST_F()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/ndk/ |
H A D | drawing_text_typography_test.cpp | 32 #include "rosen_text/typography.h" 329 * @tc.desc: test for typography 351 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); in HWTEST_F() local 353 OH_Drawing_TypographySetIndents(typography, 2, indents); in HWTEST_F() 354 EXPECT_EQ(indents[1], OH_Drawing_TypographyGetIndentsWithIndex(typography, 1)); in HWTEST_F() 355 EXPECT_EQ(indents[0], OH_Drawing_TypographyGetIndentsWithIndex(typography, 0)); in HWTEST_F() 357 OH_Drawing_TypographyLayout(typography, maxWidth); in HWTEST_F() 358 EXPECT_EQ(maxWidth, OH_Drawing_TypographyGetMaxWidth(typography)); in HWTEST_F() 370 EXPECT_EQ(OH_Drawing_TypographyGetHeight(typography), 70); in HWTEST_F() 371 EXPECT_EQ(static_cast<int>(OH_Drawing_TypographyGetLongestLine(typography)), 20 in HWTEST_F() 573 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 627 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 862 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 943 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 996 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 1049 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 1105 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 1158 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 1210 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 1424 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 1451 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 1480 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 1820 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 2060 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 2086 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 2112 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 2141 OH_Drawing_Typography* typography = nullptr; HWTEST_F() local 2153 OH_Drawing_Typography* typography = nullptr; HWTEST_F() local 2167 OH_Drawing_Typography* typography = nullptr; HWTEST_F() local 2189 OH_Drawing_Typography* typography = nullptr; HWTEST_F() local 2218 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 2393 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 2436 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 2466 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local 2497 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); HWTEST_F() local [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/ |
H A D | arkTheme.js | 346 this.typography = new ArkSystemTypography(); 553 constructor(typography = {}, baselineTypography) { 556 weight: (_b = (_a = typography === null || typography === void 0 ? void 0 : typography.displayLarge) === null || _a === void 0 ? void 0 : _a.weight) !== null && _b !== void 0 ? _b : ArkTypographyWeights.light, 557 size: (_d = (_c = typography === null || typography === void 0 ? void 0 : typography.displayLarge) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : baselineTypography.displayLarge.size 560 weight: (_f = (_e = typography === null || typography [all...] |
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/src/ |
H A D | drawing_text_typography.cpp | 30 #include "rosen_text/typography.h" 459 std::unique_ptr<Typography> typography = rosenHandler->CreateTypography(); in OH_Drawing_CreateTypography() local 460 return ConvertToNDKText<OH_Drawing_Typography>(typography.release()); in OH_Drawing_CreateTypography() 463 void OH_Drawing_DestroyTypography(OH_Drawing_Typography* typography) in OH_Drawing_DestroyTypography() argument 465 delete ConvertToOriginalText<Typography>(typography); in OH_Drawing_DestroyTypography() 468 void OH_Drawing_TypographyLayout(OH_Drawing_Typography* typography, double maxWidth) in OH_Drawing_TypographyLayout() argument 470 if (!typography) { in OH_Drawing_TypographyLayout() 473 ConvertToOriginalText<Typography>(typography)->Layout(maxWidth); in OH_Drawing_TypographyLayout() 477 OH_Drawing_Typography* typography, OH_Drawing_Canvas* canvas, double potisionX, double potisionY) in OH_Drawing_TypographyPaint() 479 if (!typography || !canva in OH_Drawing_TypographyPaint() 476 OH_Drawing_TypographyPaint( OH_Drawing_Typography* typography, OH_Drawing_Canvas* canvas, double potisionX, double potisionY) OH_Drawing_TypographyPaint() argument 486 OH_Drawing_TypographyPaintOnPath( OH_Drawing_Typography* typography, OH_Drawing_Canvas* canvas, OH_Drawing_Path* path, double hOffset, double vOffset) OH_Drawing_TypographyPaintOnPath() argument 503 OH_Drawing_TypographyGetMaxWidth(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetMaxWidth() argument 511 OH_Drawing_TypographyGetHeight(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetHeight() argument 519 OH_Drawing_TypographyGetLongestLine(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetLongestLine() argument 527 OH_Drawing_TypographyGetLongestLineWithIndent(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetLongestLineWithIndent() argument 535 OH_Drawing_TypographyGetMinIntrinsicWidth(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetMinIntrinsicWidth() argument 543 OH_Drawing_TypographyGetMaxIntrinsicWidth(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetMaxIntrinsicWidth() argument 551 OH_Drawing_TypographyGetAlphabeticBaseline(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetAlphabeticBaseline() argument 559 OH_Drawing_TypographyGetIdeographicBaseline(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetIdeographicBaseline() argument 576 OH_Drawing_TypographyDidExceedMaxLines(OH_Drawing_Typography* typography) OH_Drawing_TypographyDidExceedMaxLines() argument 584 OH_Drawing_TypographyGetRectsForRange(OH_Drawing_Typography* typography, size_t start, size_t end, OH_Drawing_RectHeightStyle heightStyle, OH_Drawing_RectWidthStyle widthStyle) OH_Drawing_TypographyGetRectsForRange() argument 601 OH_Drawing_TypographyGetRectsForPlaceholders(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetRectsForPlaceholders() argument 699 OH_Drawing_TypographyGetGlyphPositionAtCoordinate( OH_Drawing_Typography* typography, double dx, double dy) OH_Drawing_TypographyGetGlyphPositionAtCoordinate() argument 712 OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster( OH_Drawing_Typography* typography, double dx, double dy) OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster() argument 754 OH_Drawing_TypographyGetWordBoundary(OH_Drawing_Typography* typography, size_t offset) OH_Drawing_TypographyGetWordBoundary() argument 785 OH_Drawing_TypographyGetLineCount(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetLineCount() argument 973 OH_Drawing_TypographyGetLineHeight(OH_Drawing_Typography* typography, int lineNumber) OH_Drawing_TypographyGetLineHeight() argument 982 OH_Drawing_TypographyGetLineWidth(OH_Drawing_Typography* typography, int lineNumber) OH_Drawing_TypographyGetLineWidth() argument 991 OH_Drawing_TypographyGetLineTextRange( OH_Drawing_Typography* typography, int lineNumber, bool includeSpaces) OH_Drawing_TypographyGetLineTextRange() argument 1041 OH_Drawing_TypographyGetLineInfo(OH_Drawing_Typography* typography, int lineNumber, bool oneLine, bool includeWhitespace, OH_Drawing_LineMetrics* drawingLineMetrics) OH_Drawing_TypographyGetLineInfo() argument 1286 OH_Drawing_TypographyGetLineMetrics(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetLineMetrics() argument 1323 OH_Drawing_TypographyGetLineMetricsAt( OH_Drawing_Typography* typography, int lineNumber, OH_Drawing_LineMetrics* lineMetric) OH_Drawing_TypographyGetLineMetricsAt() argument 1337 OH_Drawing_TypographyGetIndentsWithIndex(OH_Drawing_Typography* typography, int index) OH_Drawing_TypographyGetIndentsWithIndex() argument 1349 OH_Drawing_TypographySetIndents(OH_Drawing_Typography* typography, int indentsNumber, const float indents[]) OH_Drawing_TypographySetIndents() argument 1692 OH_Drawing_TextStyleGetFontMetrics( OH_Drawing_Typography* typography, OH_Drawing_TextStyle* style, OH_Drawing_Font_Metrics* fontmetrics) OH_Drawing_TextStyleGetFontMetrics() argument 2137 OH_Drawing_TypographyMarkDirty(OH_Drawing_Typography* typography) OH_Drawing_TypographyMarkDirty() argument 2145 OH_Drawing_TypographyGetUnresolvedGlyphsCount(OH_Drawing_Typography* typography) OH_Drawing_TypographyGetUnresolvedGlyphsCount() argument 2153 OH_Drawing_TypographyUpdateFontSize(OH_Drawing_Typography* typography, size_t from, size_t to, float fontSize) OH_Drawing_TypographyUpdateFontSize() argument 3178 OH_Drawing_TypographyGetLineFontMetrics( OH_Drawing_Typography* typography, size_t lineNumber, size_t* fontMetricsSize) OH_Drawing_TypographyGetLineFontMetrics() argument [all...] |
H A D | drawing_text_line.cpp | 32 OH_Drawing_Array* OH_Drawing_TypographyGetTextLines(OH_Drawing_Typography* typography) in OH_Drawing_TypographyGetTextLines() argument 34 if (typography == nullptr) { in OH_Drawing_TypographyGetTextLines() 38 auto paragraph = reinterpret_cast<Typography*>(typography)->GetParagraph(); in OH_Drawing_TypographyGetTextLines()
|
/foundation/graphic/graphic_2d/rosen/samples/text/renderservice/ |
H A D | main.cpp | 47 #include "rosen_text/ui/typography.h"
93 std::unique_ptr<rosen::Typography> typography;
in DoDraw() local 94 typography = builder->Build();
in DoDraw() 95 if (typography == nullptr) {
in DoDraw() 96 LOGD("typography == nullptr");
in DoDraw() 100 typography->Layout(lastLayoutMaxWidth);
in DoDraw() 101 typography->Paint(&canvas, 10.0, 15.0); // pos to paint 10.0, 15.0
in DoDraw()
|
H A D | drawing_text_c_sample.cpp | 73 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); in DoDraw() local 75 OH_Drawing_TypographyLayout(typography, maxWidth); in DoDraw() 77 OH_Drawing_TypographyPaint(typography, cCanvas, position[0], position[1]); in DoDraw() 91 OH_Drawing_DestroyTypography(typography); in DoDraw()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/ndk/drawing_fuzzer/ |
H A D | drawing_fuzzer.cpp | 22 #include "rosen_text/typography.h" 343 OH_Drawing_Typography* typography = OH_Drawing_CreateTypography(handler); in OHDrawingTypographyTest() local 344 OH_Drawing_TypographyLayout(typography, static_cast<float>(data[0])); in OHDrawingTypographyTest() 345 OH_Drawing_TypographyGetMaxWidth(typography); in OHDrawingTypographyTest() 355 OH_Drawing_TypographyGetHeight(typography); in OHDrawingTypographyTest() 356 OH_Drawing_TypographyGetLongestLine(typography); in OHDrawingTypographyTest() 357 OH_Drawing_TypographyGetMinIntrinsicWidth(typography); in OHDrawingTypographyTest() 358 OH_Drawing_TypographyGetMaxIntrinsicWidth(typography); in OHDrawingTypographyTest() 359 OH_Drawing_TypographyGetAlphabeticBaseline(typography); in OHDrawingTypographyTest() 360 OH_Drawing_TypographyGetIdeographicBaseline(typography); in OHDrawingTypographyTest() [all...] |
/foundation/graphic/graphic_2d/rosen/samples/2d_graphics/PathDrawingSample/entry/src/main/cpp/samples/ |
H A D | sample_bitmap.cpp | 293 OH_Drawing_Typography *typography = OH_Drawing_CreateTypography(handler); in DrawTextInPath() local 296 OH_Drawing_TypographyLayout(typography, maxWidth); in DrawTextInPath() 300 OH_Drawing_TypographyPaint(typography, cCanvas_, position[0], position[1]); in DrawTextInPath() 371 OH_Drawing_Typography *typography = OH_Drawing_CreateTypography(handler); in DrawText() local 374 OH_Drawing_TypographyLayout(typography, maxWidth); in DrawText() 378 OH_Drawing_TypographyPaint(typography, cCanvas_, position[0], position[1]); in DrawText()
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/include/ |
H A D | drawing_text_line.h | 51 * @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>. 56 OH_Drawing_Array* OH_Drawing_TypographyGetTextLines(OH_Drawing_Typography* typography);
|
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/text/line_typeset_napi/ |
H A D | js_line_typeset.cpp | 95 TEXT_LOGE("Wrap line typography error, status value is %{public}d", status); in CreateJsLineTypeset() 137 return NapiThrowError(env, TextErrorCode::ERROR_INVALID_PARAM, "Line typography is null."); in OnGetLineBreak() 167 return NapiThrowError(env, TextErrorCode::ERROR_INVALID_PARAM, "Line typography is null."); in OnCreateLine() 188 std::shared_ptr<Typography> typography = lineTypography_->GetTempTypography(); in OnCreateLine() local 199 jsTextLine->SetParagraph(typography); in OnCreateLine()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/canvas/ |
H A D | canvas_custom_paint_method_testtwo_ng.cpp | 701 Testing::MockTypography typography; in HWTEST_F() local 706 EXPECT_CALL(typography, Layout(_)).WillRepeatedly(Return()); in HWTEST_F() 709 EXPECT_CALL(typography, Paint(_, _, _)).WillRepeatedly(Return()); in HWTEST_F() 713 EXPECT_CALL(typography, Layout(_)).WillRepeatedly(Return()); in HWTEST_F() 716 EXPECT_CALL(typography, Paint(_, _, _)).WillRepeatedly(Return()); in HWTEST_F() 721 EXPECT_CALL(typography, Layout(_)).WillRepeatedly(Return()); in HWTEST_F() 724 EXPECT_CALL(typography, Paint(_, _, _)).WillRepeatedly(Return()); in HWTEST_F()
|
H A D | canvas_custom_paint_method_test_ng.cpp | 1147 Testing::MockTypography typography; in HWTEST_F() local 1158 EXPECT_CALL(typography, Layout(_)).WillRepeatedly(Return()); in HWTEST_F() 1161 EXPECT_CALL(typography, Paint(_, _, _)).WillRepeatedly(Return()); in HWTEST_F() 1166 EXPECT_CALL(typography, Layout(_)).WillRepeatedly(Return()); in HWTEST_F() 1169 EXPECT_CALL(typography, Paint(_, _, _)).WillRepeatedly(Return()); in HWTEST_F() 1174 EXPECT_CALL(typography, Layout(_)).WillRepeatedly(Return()); in HWTEST_F() 1177 EXPECT_CALL(typography, Paint(_, _, _)).WillRepeatedly(Return()); in HWTEST_F()
|
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/text/paragraph_builder_napi/ |
H A D | js_paragraph_builder.cpp | 52 TEXT_LOGE("Failed to create typography creator"); in Constructor() 243 std::unique_ptr<OHOS::Rosen::Typography> typography = typographyCreate_->CreateTypography(); in OnBuild() local 244 return JsParagraph::CreateJsTypography(env, std::move(typography)); in OnBuild() 261 return NapiThrowError(env, TextErrorCode::ERROR_INVALID_PARAM, "Failed to create line typography."); in OnBuildLineTypeset()
|
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/text/paragraph_napi/ |
H A D | js_paragraph.h | 23 #include "typography.h" 57 static napi_value CreateJsTypography(napi_env env, std::unique_ptr<Typography> typography);
|
H A D | js_paragraph.cpp | 726 JsParagraph::JsParagraph(std::shared_ptr<Typography> typography) in JsParagraph() argument 727 : paragraph_(typography) in JsParagraph() 735 napi_value JsParagraph::CreateJsTypography(napi_env env, std::unique_ptr<Typography> typography) in CreateJsTypography() argument 741 g_Typography = std::move(typography); in CreateJsTypography()
|