diff --git a/graphic_test/graphic_test/rs_display_effect/content_display/content_effectnode_test.cpp b/graphic_test/graphic_test/rs_display_effect/content_display/content_effectnode_test.cpp index 97d4c6cd2a..747dd1e3d3 100644 --- a/graphic_test/graphic_test/rs_display_effect/content_display/content_effectnode_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/content_display/content_effectnode_test.cpp @@ -25,8 +25,8 @@ namespace OHOS::Rosen { class ContentEffectNodeTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_alpha_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_alpha_test.cpp index e761edeee0..ccccb6c93a 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_alpha_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_alpha_test.cpp @@ -24,8 +24,8 @@ namespace OHOS::Rosen { class AppearanceTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_border_radius_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_border_radius_test.cpp index 2c71467c20..27da4a9835 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_border_radius_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_border_radius_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class AppearanceTest01 : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -58,9 +58,9 @@ GRAPHIC_TEST(AppearanceTest01, CONTENT_DISPLAY_TEST, Appearance_Border_Radius_Co const int nodeCount = 4; const int columnCount = 2; - const int nodeSize = 500; - const int nodeHalfSize = 250; - const int nodePos = 520; + const int nodeSize = 400; + const int nodeHalfSize = 200; + const int nodePos = 420; for (int i = 0; i < nodeCount; i++) { int x = (i % columnCount) * nodePos; diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_border_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_border_test.cpp index bb1bc30f61..8ae4e48f31 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_border_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_border_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class AppearanceTest02 : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -56,9 +56,9 @@ GRAPHIC_TEST(AppearanceTest02, CONTENT_DISPLAY_TEST, Appearance_Border_Color_Tes const int nodeCount = 4; const int columnCount = 2; - const int nodeSize = 500; - const int nodeHalfSize = 250; - const int nodePos = 520; + const int nodeSize = 400; + const int nodeHalfSize = 200; + const int nodePos = 420; const int testPos = 50; for (int i = 0; i < nodeCount; i++) { diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_clip_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_clip_test.cpp index 7ee01fa824..d3ca11a50d 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_clip_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_clip_test.cpp @@ -24,8 +24,8 @@ namespace OHOS::Rosen { class AppearanceTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_outlineborder_radius_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_outlineborder_radius_test.cpp index d8f7340183..98839518c9 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_outlineborder_radius_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_outlineborder_radius_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class AppearanceTest03 : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -56,9 +56,9 @@ GRAPHIC_TEST(AppearanceTest03, CONTENT_DISPLAY_TEST, Appearance_OutlineBorder_Ra const int nodeCount = 4; const int columnCount = 2; - const int nodeSize = 500; - const int nodeHalfSize = 250; - const int nodePos = 520; + const int nodeSize = 400; + const int nodeHalfSize = 200; + const int nodePos = 420; for (int i = 0; i < nodeCount; i++) { int x = (i % columnCount) * nodePos; @@ -107,11 +107,11 @@ GRAPHIC_TEST(AppearanceTest03, CONTENT_DISPLAY_TEST, Appearance_OutlineBorder_Ra const int nodeCount = 3; const int columnCount = 2; - const int nodeSize = 500; - const int nodePos = 520; + const int nodeSize = 400; + const int nodePos = 420; const float radiusVal = 50.0f; const int offsetVal = 20; - const int offsetVal2 = 600; + const int offsetVal2 = 400; for (int i = 0; i < nodeCount; i++) { int x = (i % columnCount) * nodePos; diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_outlineborder_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_outlineborder_test.cpp index 1bd68873ec..bf0ac42ede 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_outlineborder_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_outlineborder_test.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class AppearanceTest04 : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -53,10 +53,10 @@ GRAPHIC_TEST(AppearanceTest04, CONTENT_DISPLAY_TEST, Appearance_OutlineBorder_Co Color colorList[] = { Color(0, 0, 0), Color(255, 0, 0), Color(0, 255, 0), Color(0, 0, 255) }; for (int i = 0; i < FOUR_; i++) { - int x = (i % TWO_) * FIVE_HUNDRED_TWENTY_; - int y = (i / TWO_) * FIVE_HUNDRED_TWENTY_; + int x = (i % TWO_) * FOUR_HUNDRED_TWENTY_; + int y = (i / TWO_) * FOUR_HUNDRED_TWENTY_; auto testNodeColor = RSCanvasNode::Create(); - setNode(testNodeColor, { x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }, Vector4(colorList[i])); + setNode(testNodeColor, { x, y, FOUR_HUNDRED_, FOUR_HUNDRED_ }, Vector4(colorList[i])); GetRootNode()->AddChild(testNodeColor); RegisterNode(testNodeColor); } @@ -64,28 +64,27 @@ GRAPHIC_TEST(AppearanceTest04, CONTENT_DISPLAY_TEST, Appearance_OutlineBorder_Co // parent black, child red color, white border auto testNodeParent = RSCanvasNode::Create(); setNode( - testNodeParent, { 0, FIVE_HUNDRED_TWENTY_ * 2, FIVE_HUNDRED_, FIVE_HUNDRED_ }, Vector4(colorList[0])); + testNodeParent, { 0, FOUR_HUNDRED_TWENTY_ * 2, FOUR_HUNDRED_, FOUR_HUNDRED_ }, Vector4(colorList[0])); testNodeParent->SetBackgroundColor(0xff000000); GetRootNode()->AddChild(testNodeParent); RegisterNode(testNodeParent); auto testNodeChild = RSCanvasNode::Create(); - setNode( - testNodeChild, { FIFTY_, FIFTY_, TWO_HUNDRED_FIFTY_, TWO_HUNDRED_FIFTY_ }, Vector4(Color(0xffffffff))); + setNode(testNodeChild, { FIFTY_, FIFTY_, TWO_HUNDRED_, TWO_HUNDRED_ }, Vector4(Color(0xffffffff))); testNodeChild->SetForegroundColor(0xffff0000); testNodeParent->AddChild(testNodeChild); RegisterNode(testNodeChild); // alpha border auto testNodeAlphaColor = RSCanvasNode::Create(); - setNode(testNodeAlphaColor, { FIVE_HUNDRED_TWENTY_, FIVE_HUNDRED_TWENTY_ * 2, FIVE_HUNDRED_, FIVE_HUNDRED_ }, + setNode(testNodeAlphaColor, { FOUR_HUNDRED_TWENTY_, FOUR_HUNDRED_TWENTY_ * 2, FOUR_HUNDRED_, FOUR_HUNDRED_ }, Vector4(Color(0x7dffffff))); GetRootNode()->AddChild(testNodeAlphaColor); RegisterNode(testNodeAlphaColor); // four different color auto testNodeFourColor = RSCanvasNode::Create(); - setNode(testNodeFourColor, { 0, FIVE_HUNDRED_TWENTY_ * 3, FIVE_HUNDRED_, FIVE_HUNDRED_ }, + setNode(testNodeFourColor, { 0, FOUR_HUNDRED_TWENTY_ * 3, FOUR_HUNDRED_, FOUR_HUNDRED_ }, Vector4(colorList[0], colorList[1], colorList[2], colorList[3])); GetRootNode()->AddChild(testNodeFourColor); RegisterNode(testNodeFourColor); @@ -100,10 +99,10 @@ GRAPHIC_TEST(AppearanceTest04, CONTENT_DISPLAY_TEST, Appearance_OutlineBorder_Wi Vector4 outLineColor = { color, color, color, color }; for (int i = 0; i < THREE_; i++) { - int x = (i % TWO_) * FIVE_HUNDRED_TWENTY_; - int y = (i / TWO_) * FIVE_HUNDRED_TWENTY_; + int x = (i % TWO_) * FOUR_HUNDRED_TWENTY_; + int y = (i / TWO_) * FOUR_HUNDRED_TWENTY_; auto testNodeWidth = RSCanvasNode::Create(); - testNodeWidth->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); + testNodeWidth->SetBounds({ x, y, FOUR_HUNDRED_, FOUR_HUNDRED_ }); testNodeWidth->SetTranslate(widthList[i] + TWENTY_, widthList[i] + FIFTY_, 0); testNodeWidth->SetOutlineStyle(style); testNodeWidth->SetOutlineWidth({ widthList[i], widthList[i], widthList[i], widthList[i] }); @@ -114,8 +113,8 @@ GRAPHIC_TEST(AppearanceTest04, CONTENT_DISPLAY_TEST, Appearance_OutlineBorder_Wi // four different width auto testNodeFourWidth = RSCanvasNode::Create(); - testNodeFourWidth->SetBounds({ 0, FIVE_HUNDRED_TWENTY_ * 2, FIVE_HUNDRED_, FIVE_HUNDRED_ }); - testNodeFourWidth->SetTranslate(TWENTY_, SIX_HUNDRED_, 0); + testNodeFourWidth->SetBounds({ 0, FOUR_HUNDRED_TWENTY_ * 2, FOUR_HUNDRED_, FOUR_HUNDRED_ }); + testNodeFourWidth->SetTranslate(TWENTY_, FOUR_HUNDRED_, 0); testNodeFourWidth->SetOutlineStyle(style); testNodeFourWidth->SetOutlineWidth({ widthList[1] * 0, widthList[1] * 2, widthList[1] * 4, widthList[1] * 8 }); testNodeFourWidth->SetOutlineColor(outLineColor); diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_shadow_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_shadow_test.cpp index 12241c445a..78cf73ebcf 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_shadow_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_shadow_test.cpp @@ -24,8 +24,8 @@ namespace OHOS::Rosen { class AppearanceTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -40,12 +40,16 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Color_Test_ { uint32_t colorList[] = { 0xff000000, 0xffff0000, 0xff00ff00, 0xff0000ff }; + int nodePos = 500; + int nodeOffset = 100; + int nodeSize = 400; + for (int i = 0; i < FOUR_; i++) { - int x = (i % TWO_) * SIX_HUNDRED_; - int y = (i / TWO_) * SIX_HUNDRED_; + int x = (i % TWO_) * nodePos; + int y = (i / TWO_) * nodePos; auto testNodeColor = RSCanvasNode::Create(); - testNodeColor->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); - testNodeColor->SetTranslate(ONE_HUNDRED_, ONE_HUNDRED_, 0); + testNodeColor->SetBounds({ x, y, nodeSize, nodeSize }); + testNodeColor->SetTranslate(nodeOffset, nodeOffset, 0); testNodeColor->SetShadowColor(colorList[i]); testNodeColor->SetShadowRadius(FIFTY_); GetRootNode()->AddChild(testNodeColor); @@ -56,12 +60,16 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Color_Test_ // shadow offset GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Offset_Test_1) { + int nodePos = 500; + int nodeOffset = 100; + int nodeSize = 400; + for (int i = 0; i < FOUR_; i++) { - int x = (i % TWO_) * SIX_HUNDRED_; - int y = (i / TWO_) * SIX_HUNDRED_; + int x = (i % TWO_) * nodePos; + int y = (i / TWO_) * nodePos; auto testNodeOffset = RSCanvasNode::Create(); - testNodeOffset->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); - testNodeOffset->SetTranslate(ONE_HUNDRED_, ONE_HUNDRED_, 0); + testNodeOffset->SetBounds({ x, y, nodeSize, nodeSize }); + testNodeOffset->SetTranslate(nodeOffset, nodeOffset, 0); testNodeOffset->SetShadowColor(0xff000000); switch (i) { case 0: { @@ -91,12 +99,16 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Offset_Test GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Offset_Test_2) { + int nodePos = 500; + int nodeOffset = 100; + int nodeSize = 400; + for (int i = 0; i < FIVE_; i++) { - int x = (i % TWO_) * FIVE_HUNDRED_TEN_; - int y = (i / TWO_) * SIX_HUNDRED_; + int x = (i % TWO_) * nodePos; + int y = (i / TWO_) * nodePos; auto testNodeOffset = RSCanvasNode::Create(); - testNodeOffset->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); - testNodeOffset->SetTranslate(ONE_HUNDRED_, ONE_HUNDRED_, 0); + testNodeOffset->SetBounds({ x, y, nodeSize, nodeSize }); + testNodeOffset->SetTranslate(nodeOffset, nodeOffset, 0); testNodeOffset->SetBackgroundColor(0xffc0c0c0); testNodeOffset->SetShadowColor(0xff000000); testNodeOffset->SetShadowRadius(50); @@ -119,8 +131,8 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Offset_Test break; } case 4: { - testNodeOffset->SetTranslate(0, TWO_HUNDRED_, 0); - testNodeOffset->SetShadowOffset(FIVE_HUNDRED_, FIVE_HUNDRED_); + testNodeOffset->SetTranslate(0, nodeOffset, 0); + testNodeOffset->SetShadowOffset(nodeSize, nodeSize); break; } default: @@ -134,14 +146,18 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Offset_Test // shadow alpha GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Alpha_Test_1) { + int nodePos = 500; + int nodeOffset = 100; + int nodeSize = 400; + float alphaList[] = { 0, 0.2, 0.8, 1 }; for (int i = 0; i < FOUR_; i++) { - int x = (i % TWO_) * SIX_HUNDRED_; - int y = (i / TWO_) * SIX_HUNDRED_; + int x = (i % TWO_) * nodePos; + int y = (i / TWO_) * nodePos; auto testNodeAlpha = RSCanvasNode::Create(); - testNodeAlpha->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); - testNodeAlpha->SetTranslate(ONE_HUNDRED_, ONE_HUNDRED_, 0); + testNodeAlpha->SetBounds({ x, y, nodeSize, nodeSize }); + testNodeAlpha->SetTranslate(nodeOffset, nodeOffset, 0); testNodeAlpha->SetBackgroundColor(0xffc0c0c0); testNodeAlpha->SetShadowColor(0xff000000); testNodeAlpha->SetShadowAlpha(alphaList[i]); @@ -154,14 +170,18 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Alpha_Test_ // shadow radius GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Radius_Test_1) { + int nodePos = 500; + int nodeOffset = 100; + int nodeSize = 400; + float radiusList[] = { 0, 50, 250 }; for (int i = 0; i < THREE_; i++) { - int x = (i % TWO_) * SIX_HUNDRED_; - int y = (i / TWO_) * SIX_HUNDRED_; + int x = (i % TWO_) * nodePos; + int y = (i / TWO_) * nodePos; auto testNodeRadius = RSCanvasNode::Create(); - testNodeRadius->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); - testNodeRadius->SetTranslate(ONE_HUNDRED_, ONE_HUNDRED_, 0); + testNodeRadius->SetBounds({ x, y, nodeSize, nodeSize }); + testNodeRadius->SetTranslate(nodeOffset, nodeOffset, 0); testNodeRadius->SetBackgroundColor(0xffc0c0c0); testNodeRadius->SetShadowColor(0xff000000); testNodeRadius->SetShadowRadius(radiusList[i]); @@ -173,15 +193,15 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Radius_Test const int yPos = 1250; for (int i = 0; i < 2; i++) { auto testNodeParent = RSCanvasNode::Create(); - testNodeParent->SetBounds({ i * SIX_HUNDRED_, yPos, FIVE_HUNDRED_, FIVE_HUNDRED_ }); - testNodeParent->SetTranslate(ONE_HUNDRED_, ONE_HUNDRED_, 0); + testNodeParent->SetBounds({ i * nodePos, yPos, nodeSize, nodeSize }); + testNodeParent->SetTranslate(nodeOffset, nodeOffset, 0); testNodeParent->SetClipToBounds(i); GetRootNode()->AddChild(testNodeParent); RegisterNode(testNodeParent); auto testNodeChild = RSCanvasNode::Create(); - testNodeChild->SetBounds({ 0, 0, FOUR_HUNDRED_, FOUR_HUNDRED_ }); - testNodeChild->SetTranslate(ONE_HUNDRED_, ONE_HUNDRED_, 0); + testNodeChild->SetBounds({ 0, 0, nodeSize, nodeSize }); + testNodeChild->SetTranslate(nodeOffset, nodeOffset, 0); testNodeChild->SetBackgroundColor(0xffc0c0c0); testNodeChild->SetShadowColor(0xff000000); testNodeChild->SetShadowRadius(FIFTY_); @@ -237,17 +257,21 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Strategy_Te // shadow filled GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Filled_Test_1) { + int nodePos = 500; + int nodeOffset = 100; + int nodeSize = 400; + float alphaList[] = { 1, 0.5 }; for (int i = 0; i < FOUR_; i++) { - int x = (i % TWO_) * SIX_HUNDRED_; - int y = (i / TWO_) * SIX_HUNDRED_; + int x = (i % TWO_) * nodePos; + int y = (i / TWO_) * nodePos; auto testNodeFilled = RSCanvasNode::Create(); - testNodeFilled->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); - testNodeFilled->SetTranslate(ONE_HUNDRED_, ONE_HUNDRED_, 0); + testNodeFilled->SetBounds({ x, y, nodeSize, nodeSize }); + testNodeFilled->SetTranslate(nodeOffset, nodeOffset, 0); auto imageModifier = std::make_shared(); - imageModifier->SetWidth(FIVE_HUNDRED_); - imageModifier->SetHeight(FIVE_HUNDRED_); + imageModifier->SetWidth(nodeSize); + imageModifier->SetHeight(nodeSize); imageModifier->SetPixelMapPath("/data/local/tmp/appearance_test.jpg"); testNodeFilled->AddModifier(imageModifier); testNodeFilled->SetAlpha(0.5); @@ -264,14 +288,17 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Filled_Test // shadow mask GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_mask_Test_1) { + int nodePos = 500; + int nodeSize = 400; + for (int i = 0; i < TWO_; i++) { - int x = (i % TWO_) * SIX_HUNDRED_; - int y = (i / TWO_) * SIX_HUNDRED_; + int x = (i % TWO_) * nodePos; + int y = (i / TWO_) * nodePos; auto testNodeMask = RSCanvasNode::Create(); - testNodeMask->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); + testNodeMask->SetBounds({ x, y, nodeSize, nodeSize }); auto imageModifier = std::make_shared(); - imageModifier->SetWidth(FIVE_HUNDRED_); - imageModifier->SetHeight(FIVE_HUNDRED_); + imageModifier->SetWidth(nodeSize); + imageModifier->SetHeight(nodeSize); imageModifier->SetPixelMapPath("/data/local/tmp/appearance_test.jpg"); testNodeMask->AddModifier(imageModifier); testNodeMask->SetShadowMask(i); @@ -285,14 +312,17 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_mask_Test_1 // shadow touch GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, Appearance_Shadow_Touch_Test_1) { + int nodePos = 500; + int nodeSize = 400; + float alphaList[] = { 1, 0.5 }; uint32_t colorList[] = { 0xff000000, 0xffff0000 }; for (int i = 0; i < FOUR_; i++) { - int x = (i % TWO_) * SIX_HUNDRED_; - int y = (i / TWO_) * SIX_HUNDRED_; + int x = (i % TWO_) * nodePos; + int y = (i / TWO_) * nodePos; auto testNodeTouch = RSCanvasNode::Create(); - testNodeTouch->SetBounds({ x, y, FIVE_HUNDRED_, FIVE_HUNDRED_ }); + testNodeTouch->SetBounds({ x, y, nodeSize, nodeSize }); testNodeTouch->SetShadowColor(colorList[i]); testNodeTouch->SetShadowRadius(ONE_HUNDRED_); testNodeTouch->SetShadowAlpha(alphaList[i / TWO_]); diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_spherize_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_spherize_test.cpp index 2a9c0aa15c..642042b9cd 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/appearance_spherize_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/appearance_spherize_test.cpp @@ -24,8 +24,8 @@ namespace OHOS::Rosen { class AppearanceTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_blur_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_blur_test.cpp index 3118f6fa6d..b77df26be9 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_blur_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_blur_test.cpp @@ -27,8 +27,8 @@ namespace OHOS::Rosen { class ForegroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_colorbrightness_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_colorbrightness_test.cpp index 521b2c8956..c7c8f6ac01 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_colorbrightness_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_colorbrightness_test.cpp @@ -26,8 +26,8 @@ namespace OHOS::Rosen { class ForegroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_colorfilter_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_colorfilter_test.cpp index dc63e2438d..288d807d21 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_colorfilter_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_colorfilter_test.cpp @@ -24,8 +24,8 @@ namespace OHOS::Rosen { class ForegroundTest01 : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_dynamicdimdegree_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_dynamicdimdegree_test.cpp index b0dffe0287..e91828b600 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_dynamicdimdegree_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_dynamicdimdegree_test.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class ForegroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_dynamiclightup_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_dynamiclightup_test.cpp index 43633d7718..f603f8c816 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_dynamiclightup_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_dynamiclightup_test.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class ForegroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_envfgcolor_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_envfgcolor_test.cpp index 36bfbc7077..cdf1786b47 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_envfgcolor_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_envfgcolor_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class ForegroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_fgcolor_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_fgcolor_test.cpp index a076a42777..256e12f466 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_fgcolor_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_fgcolor_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class ForegroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_light_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_light_test.cpp index 9c819e6b62..af85625a0c 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_light_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_light_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class ForegroundTest02 : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_lightupeffect_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_lightupeffect_test.cpp index b769f4b4e5..6fe60f1522 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_lightupeffect_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_lightupeffect_test.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class ForegroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/fg_mask_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/fg_mask_test.cpp index 4a4bb80456..261b66e4db 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/fg_mask_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/fg_mask_test.cpp @@ -27,8 +27,8 @@ namespace OHOS::Rosen { class ForegroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/geom_cameradistance_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/geom_cameradistance_test.cpp index 8ecf28d6fb..b7cf347a72 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/geom_cameradistance_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/geom_cameradistance_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class GeometryTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -37,7 +37,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, CameraDistance_Test_1) { float zList[] = { 0.0, 0.5, 1, 100.0 }; for (int i = 0; i < 4; i++) { - auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 680 + 40, 600, 600 }); + auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 480 + 40, 600, 600 }); testNode->SetPivot(Vector2f(0.5, 0.5)); testNode->SetRotation(45.0, 0, 45.0); testNode->SetCameraDistance(zList[i]); diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/geom_clip_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/geom_clip_test.cpp index e31d44b7d0..05a8b0da1f 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/geom_clip_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/geom_clip_test.cpp @@ -24,8 +24,8 @@ namespace OHOS::Rosen { class GeometryTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/geom_cornerradius_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/geom_cornerradius_test.cpp index 5f0c8978d7..987f119d52 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/geom_cornerradius_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/geom_cornerradius_test.cpp @@ -24,8 +24,8 @@ namespace OHOS::Rosen { class GeometryTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/geom_persp_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/geom_persp_test.cpp index 9317a487f7..8853bbf32b 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/geom_persp_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/geom_persp_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class GeometryTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/geom_pivotandrotation_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/geom_pivotandrotation_test.cpp index 0a24ec3e79..0f6dd7264a 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/geom_pivotandrotation_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/geom_pivotandrotation_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class GeometryTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -42,7 +42,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, Pivot_0_Rotation_float_Test_1) { 45, 45, 45 }, }; for (int i = 0; i < 4; i++) { - auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 680 + 40, 600, 600 }); + auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 280, i * 480 + 40, 400, 400 }); testNode->SetPivot(Vector2f(0, 0)); testNode->SetRotation(degreeList[i][0], degreeList[i][1], degreeList[i][2]); GetRootNode()->AddChild(testNode); @@ -59,7 +59,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, Pivot_05_Rotation_float_Test_1) { 45, 45, 45 }, }; for (int i = 0; i < 4; i++) { - auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 680 + 40, 600, 600 }); + auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 280, i * 480 + 40, 400, 400 }); testNode->SetPivot(Vector2f(0.5, 0.5)); testNode->SetRotation(degreeList[i][0], degreeList[i][1], degreeList[i][2]); GetRootNode()->AddChild(testNode); @@ -76,7 +76,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, Pivot_1_Rotation_float_Test_1) { 45, 45, 45 }, }; for (int i = 0; i < 4; i++) { - auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 680 + 40, 600, 600 }); + auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 280, i * 480 + 40, 400, 400 }); testNode->SetPivot(Vector2f(1, 1)); testNode->SetRotation(degreeList[i][0], degreeList[i][1], degreeList[i][2]); GetRootNode()->AddChild(testNode); @@ -93,7 +93,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, Pivot_0_Rotation_quaternion_Tes { 0.462, 0.191, 0.462, 0.733 }, }; for (int i = 0; i < 4; i++) { - auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 680 + 40, 600, 600 }); + auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 280, i * 480 + 40, 400, 400 }); testNode->SetPivot(Vector2f(0, 0)); testNode->SetRotation(degreeList[i]); GetRootNode()->AddChild(testNode); @@ -110,7 +110,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, Pivot_05_Rotation_quaternion_Te { 0.462, 0.191, 0.462, 0.733 }, }; for (int i = 0; i < 4; i++) { - auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 680 + 40, 600, 600 }); + auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 280, i * 480 + 40, 400, 400 }); testNode->SetPivot(Vector2f(0.5, 0.5)); testNode->SetRotation(degreeList[i]); GetRootNode()->AddChild(testNode); @@ -127,7 +127,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, Pivot_1_Rotation_quaternion_Tes { 0.462, 0.191, 0.462, 0.733 }, }; for (int i = 0; i < 4; i++) { - auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 680 + 40, 600, 600 }); + auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 280, i * 480 + 40, 400, 400 }); testNode->SetPivot(Vector2f(1, 1)); testNode->SetRotation(degreeList[i]); GetRootNode()->AddChild(testNode); @@ -139,7 +139,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, PivotZ_Rotation_Test_1) { float zList[] = { 0.0, 0.5, 1.0, 100.0 }; for (int i = 0; i < 4; i++) { - auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 380, i * 680 + 40, 600, 600 }); + auto testNode = SetUpNodeBgImage("/data/local/tmp/geom_test.jpg", { 280, i * 480 + 40, 400, 400 }); testNode->SetPivot(Vector2f(0.5, 0.5)); testNode->SetPivotZ(zList[i]); testNode->SetRotation(0, 45.0, 0); diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/geom_scale_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/geom_scale_test.cpp index 997c275bd1..ef0b5ae45e 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/geom_scale_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/geom_scale_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class GeometryTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/geom_translation_test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/geom_translation_test.cpp index 1ecdc88cc8..2a35907ceb 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/geom_translation_test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/geom_translation_test.cpp @@ -22,8 +22,8 @@ namespace OHOS::Rosen { class GeometryTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/parameters_defination.h b/graphic_test/graphic_test/rs_display_effect/property_display/parameters_defination.h index 6ce433a57f..624641d879 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/parameters_defination.h +++ b/graphic_test/graphic_test/rs_display_effect/property_display/parameters_defination.h @@ -42,6 +42,8 @@ #define THREE_HUNDRED_ 300 #define THREE_HUNDRED_TEN_ 310 #define FOUR_HUNDRED_ 400 +#define FOUR_HUNDRED_TEN_ 410 +#define FOUR_HUNDRED_TWENTY_ 420 #define FIVE_HUNDRED_ 500 #define FIVE_HUNDRED_TEN_ 510 #define FIVE_HUNDRED_TWENTY_ 520 diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_Appearance_PixelStretch.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_Appearance_PixelStretch.cpp index 2f9c4efdf3..e456bdca7d 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_Appearance_PixelStretch.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_Appearance_PixelStretch.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class AppearanceTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_G2_CornerRadius.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_G2_CornerRadius.cpp index e22c16aa97..a8d94c2e49 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_G2_CornerRadius.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_G2_CornerRadius.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class AppearanceTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -50,7 +50,7 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, G2_CornerRadius_DrawRoundRect int y = (i / columnCount) * sizeY; auto testNodeBackGround = RSCanvasNode::Create(); testNodeBackGround->SetBackgroundColor(0xff0000ff); - testNodeBackGround->SetBounds({ x, y, 500, 300 }); + testNodeBackGround->SetBounds({ x, y, 400, 300 }); testNodeBackGround->SetCornerRadius(normalRadius[i]); GetRootNode()->AddChild(testNodeBackGround); RegisterNode(testNodeBackGround); @@ -63,7 +63,7 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, G2_CornerRadius_DrawRoundRect int y = (i / columnCount) * sizeY; auto testNodeBackGround = RSCanvasNode::Create(); testNodeBackGround->SetBackgroundColor(0xff0000ff); - testNodeBackGround->SetBounds({ x, y, 500, 300 }); + testNodeBackGround->SetBounds({ x, y, 400, 300 }); testNodeBackGround->SetCornerRadius(asymmetryRadius[j]); GetRootNode()->AddChild(testNodeBackGround); RegisterNode(testNodeBackGround); @@ -77,7 +77,7 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, G2_CornerRadius_DrawRoundRect int y = (i / columnCount) * sizeY; auto testNodeBackGround = RSCanvasNode::Create(); testNodeBackGround->SetBackgroundColor(0xff0000ff); - testNodeBackGround->SetBounds({ x, y, 500, 300 }); + testNodeBackGround->SetBounds({ x, y, 400, 300 }); testNodeBackGround->SetCornerRadius(capsuleRadius[j]); GetRootNode()->AddChild(testNodeBackGround); RegisterNode(testNodeBackGround); @@ -99,7 +99,7 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, G2_CornerRadius_ClipRoundRect for (; i < 2; i++) { int x = (i % columnCount) * sizeX; int y = (i / columnCount) * sizeY; - auto testNodeBackGround = SetUpNodeBgImage("/data/local/tmp/Images/backGroundImage.jpg", { x, y, 500, 300 }); + auto testNodeBackGround = SetUpNodeBgImage("/data/local/tmp/Images/backGroundImage.jpg", { x, y, 400, 300 }); testNodeBackGround->SetCornerRadius(normalRadius[i]); GetRootNode()->AddChild(testNodeBackGround); RegisterNode(testNodeBackGround); @@ -111,7 +111,7 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, G2_CornerRadius_ClipRoundRect for (; i < 4; i++, j++) { int x = (i % columnCount) * sizeX; int y = (i / columnCount) * sizeY; - auto testNodeBackGround = SetUpNodeBgImage("/data/local/tmp/Images/backGroundImage.jpg", { x, y, 500, 300 }); + auto testNodeBackGround = SetUpNodeBgImage("/data/local/tmp/Images/backGroundImage.jpg", { x, y, 400, 300 }); testNodeBackGround->SetCornerRadius(asymmetryRadius[j]); GetRootNode()->AddChild(testNodeBackGround); RegisterNode(testNodeBackGround); @@ -123,7 +123,7 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, G2_CornerRadius_ClipRoundRect for (; i < 7; i++, j++) { int x = (i % columnCount) * sizeX; int y = (i / columnCount) * sizeY; - auto testNodeBackGround = SetUpNodeBgImage("/data/local/tmp/Images/backGroundImage.jpg", { x, y, 500, 300 }); + auto testNodeBackGround = SetUpNodeBgImage("/data/local/tmp/Images/backGroundImage.jpg", { x, y, 400, 300 }); testNodeBackGround->SetCornerRadius(capsuleRadius[j]); GetRootNode()->AddChild(testNodeBackGround); RegisterNode(testNodeBackGround); @@ -132,7 +132,7 @@ GRAPHIC_TEST(AppearanceTest, CONTENT_DISPLAY_TEST, G2_CornerRadius_ClipRoundRect i = 7; int x = (i % columnCount) * sizeX; int y = (i / columnCount) * sizeY; - auto testNodeBackGround = SetUpNodeBgImage("/data/local/tmp/Images/backGroundImage.jpg", { x, y, 500, 300 }); + auto testNodeBackGround = SetUpNodeBgImage("/data/local/tmp/Images/backGroundImage.jpg", { x, y, 400, 300 }); testNodeBackGround->SetCornerRadius({ 160, 180, 200, 220 }); GetRootNode()->AddChild(testNodeBackGround); RegisterNode(testNodeBackGround); diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_Geometry_Transform_Test.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_Geometry_Transform_Test.cpp index e90afb16ea..02ecfae1a3 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_Geometry_Transform_Test.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_Geometry_Transform_Test.cpp @@ -36,8 +36,8 @@ public: class GeometryTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests @@ -54,7 +54,7 @@ GRAPHIC_TEST(GeometryTest, CONTENT_DISPLAY_TEST, Geometry_Transform_Test) auto sizeX = screenWidth / columnCount; auto sizeY = screenHeight / rowCount; - std::vector transList = { { 1, 5 }, { 5, 2 } }; + std::vector transList = { { 0.1, 0.5 }, { 0.5, 0.2 } }; for (int i = 0; i < 2; i++) { int x = (i % columnCount) * sizeX; diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_BeginBlender.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_BeginBlender.cpp index 9aa9ee1e71..26e847879c 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_BeginBlender.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_BeginBlender.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class BackgroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Color.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Color.cpp index 355d0c5e85..ed9c249757 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Color.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Color.cpp @@ -25,8 +25,8 @@ namespace OHOS::Rosen { class BackgroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Filter.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Filter.cpp index 0794322c13..31b5fcb4ef 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Filter.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Filter.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class BackgroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_GreyCoef.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_GreyCoef.cpp index 043cfeb268..12be410c9b 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_GreyCoef.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_GreyCoef.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class BackgroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Image.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Image.cpp index 5d78e0583e..dc353b1a77 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Image.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_Image.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class BackgroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_UseEffect.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_UseEffect.cpp index 99faf0e558..85855393b4 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_UseEffect.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_UseEffect.cpp @@ -25,8 +25,8 @@ namespace OHOS::Rosen { class BackgroundTest01 : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests diff --git a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_WaterRipple.cpp b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_WaterRipple.cpp index 74ba13070f..b325386db7 100644 --- a/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_WaterRipple.cpp +++ b/graphic_test/graphic_test/rs_display_effect/property_display/test_RSBackground_WaterRipple.cpp @@ -23,8 +23,8 @@ namespace OHOS::Rosen { class BackgroundTest : public RSGraphicTest { private: - const int screenWidth = 1260; - const int screenHeight = 2720; + const int screenWidth = 1200; + const int screenHeight = 2000; public: // called before each tests