const char* const PROPERTY_NAME_REMOVE_FRONT_INSET = "removeFrontInset";
const char* const PROPERTY_NAME_REMOVE_BACK_INSET = "removeBackInset";
+const char* const PROPERTY_NAME_REMOVE_CUTOUT = "cutout";
const std::string DEFAULT_FONT_DIR("/resources/fonts");
const unsigned int EMOJI_FONT_SIZE = 3840u; // 60 * 64
DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_ANCHOR_CLICKED_COLOR) == DevelTextLabel::Property::ANCHOR_CLICKED_COLOR);
DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_REMOVE_FRONT_INSET) == DevelTextLabel::Property::REMOVE_FRONT_INSET);
DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_REMOVE_BACK_INSET) == DevelTextLabel::Property::REMOVE_BACK_INSET);
+ DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_REMOVE_CUTOUT) == DevelTextLabel::Property::CUTOUT);
END_TEST;
}
outlineMapSet["color"] = Color::RED;
outlineMapSet["width"] = 2.0f;
outlineMapSet["offset"] = Vector2(2.0f, 2.0f);
+ outlineMapSet["blurRadius"] = 3.0f;
label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet);
outlineMapGet = label.GetProperty<Property::Map>(TextLabel::Property::OUTLINE);
outlineMapSet[Toolkit::DevelText::Outline::Property::COLOR] = Color::BLUE;
outlineMapSet[Toolkit::DevelText::Outline::Property::WIDTH] = 3.0f;
outlineMapSet[Toolkit::DevelText::Outline::Property::OFFSET] = Vector2(3.0f, 3.0f);
+ outlineMapSet[Toolkit::DevelText::Outline::Property::BLUR_RADIUS] = 4.0f;
label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet);
outlineMapGet = label.GetProperty<Property::Map>(TextLabel::Property::OUTLINE);
DALI_TEST_EQUALS(outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION);
- std::vector<std::string> outlineIndicesConversionTable = {"color", "width", "offset"};
+ std::vector<std::string> outlineIndicesConversionTable = {"color", "width", "offset", "blurRadius"};
DALI_TEST_EQUALS(DaliTestCheckMaps(outlineMapGet, outlineMapSet, outlineIndicesConversionTable), true, TEST_LOCATION);
// Check the background property
application.SendNotification();
application.Render();
+ // Check cutout Property
+ DALI_TEST_CHECK(!label.GetProperty<bool>(DevelTextLabel::Property::CUTOUT));
+ label.SetProperty(DevelTextLabel::Property::CUTOUT, true);
+ DALI_TEST_CHECK(label.GetProperty<bool>(DevelTextLabel::Property::CUTOUT));
+
+ application.SendNotification();
+ application.Render();
+
END_TEST;
}
DALI_TEST_EQUALS(drawTrace.FindMethod("DrawArrays"), false, TEST_LOCATION); // Rendering should be skipped
+ label.SetProperty(DevelTextLabel::Property::CUTOUT, true);
+
+ drawTrace.Reset();
+
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_EQUALS(drawTrace.FindMethod("DrawArrays"), true, TEST_LOCATION); // When cutout is enabled, should not be skipped
+
+ label.SetProperty(DevelTextLabel::Property::CUTOUT, false);
label.SetProperty(TextLabel::Property::TEXT_COLOR, Color::RED);
drawTrace.Reset();
outlineMapSet["color"] = Color::BLUE;
outlineMapSet["width"] = 2.0f;
outlineMapSet["offset"] = "2 2";
+ outlineMapSet["blurRadius"] = "3";
label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet);
application.SendNotification();