mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 01:00:50 +00:00
native test case update
Signed-off-by: HaoXinyu <haoxinyu1@huawei.com>
This commit is contained in:
parent
602468aea6
commit
1df8498cf3
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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++) {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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<Color>(colorList[i]));
|
||||
setNode(testNodeColor, { x, y, FOUR_HUNDRED_, FOUR_HUNDRED_ }, Vector4<Color>(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<Color>(colorList[0]));
|
||||
testNodeParent, { 0, FOUR_HUNDRED_TWENTY_ * 2, FOUR_HUNDRED_, FOUR_HUNDRED_ }, Vector4<Color>(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>(Color(0xffffffff)));
|
||||
setNode(testNodeChild, { FIFTY_, FIFTY_, TWO_HUNDRED_, TWO_HUNDRED_ }, Vector4<Color>(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>(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<Color>(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<Color> 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);
|
||||
|
@ -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<ImageCustomModifier>();
|
||||
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<ImageCustomModifier>();
|
||||
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_]);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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,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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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<Vector2f> transList = { { 1, 5 }, { 5, 2 } };
|
||||
std::vector<Vector2f> transList = { { 0.1, 0.5 }, { 0.5, 0.2 } };
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
int x = (i % columnCount) * sizeX;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user