/foundation/arkui/ace_engine/frameworks/core/components/common/properties/ |
H A D | color.cpp | 80 Color Color::FromString(std::string colorStr, uint32_t maskAlpha, Color defaultColor) in FromString() argument 82 if (colorStr.empty()) { in FromString() 88 colorStr.erase(std::remove(colorStr.begin(), colorStr.end(), ' '), colorStr.end()); in FromString() 92 if (std::regex_match(colorStr, matches, COLOR_WITH_MAGIC)) { in FromString() 93 colorStr.erase(0, 1); in FromString() 94 unsigned long int value = HandleIncorrectColor(colorStr); in FromString() 95 if (colorStr in FromString() 166 ParseColorString(const std::string& colorStr, Color& color, const Color& defaultColor, uint32_t maskAlpha) ParseColorString() argument 184 ParseColorString(std::string colorStr, Color& color, uint32_t maskAlpha) ParseColorString() argument 200 std::string colorStr; ColorToString() local 222 std::string colorStr = str.substr(1, colorStrLen - 1); ColorFromString() local [all...] |
H A D | color.h | 66 static Color FromString(std::string colorStr, uint32_t maskAlpha = COLOR_ALPHA_MASK, 68 static bool ParseColorString(std::string colorStr, Color& color, uint32_t maskAlpha = COLOR_ALPHA_MASK); 69 static bool ParseColorString(const std::string& colorStr, Color& color, const Color& defaultColor, 153 static bool MatchColorHexString(const std::string& colorStr); 165 static bool MatchColorWithMagic(std::string& colorStr, uint32_t maskAlpha, Color& color); 166 static bool MatchColorWithMagicMini(std::string& colorStr, uint32_t maskAlpha, Color& color); 167 static bool MatchColorWithRGB(const std::string& colorStr, Color& color); 168 static bool MatchColorWithRGBA(const std::string& colorStr, Color& color); 169 static bool MatchColorSpecialString(const std::string& colorStr, Color& color); 170 static bool ParseUintColorString(const std::string& colorStr, Colo [all...] |
/foundation/window/window_manager/utils/src/ |
H A D | color_parser.cpp | 22 bool ColorParser::Parse(const std::string& colorStr, uint32_t& colorValue)
in Parse() argument 24 if (colorStr.empty()) {
in Parse() 28 if (colorStr[0] == '#') { // start with '#'
in Parse() 29 std::string color = colorStr.substr(1);
in Parse() 35 if (colorStr.size() == 7) { // 7 is color string length.#RRGGBB: RRGGBB -> AARRGGBB
in Parse() 39 if (colorStr.size() == 9) { // 9 is color string length.#AARRGGBB
in Parse() 46 bool ColorParser::IsValidHexString(const std::string& colorStr)
in IsValidHexString() argument 48 if (colorStr.empty()) {
in IsValidHexString() 51 for (char ch : colorStr) {
in IsValidHexString()
|
/foundation/arkui/ace_engine/test/mock/core/rosen/ |
H A D | testing_color.h | 103 std::string colorStr; in ColorToString() local 107 colorStr = HEX[(value & 0xf)] + colorStr; in ColorToString() 110 colorStr = "#" + colorStr; in ColorToString() 111 return colorStr; in ColorToString()
|
/foundation/window/window_manager/utils/include/ |
H A D | color_parser.h | 25 static bool Parse(const std::string& colorStr, uint32_t& colorValue); 28 static bool IsValidHexString(const std::string& colorStr);
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/components/test/unittest/common/ |
H A D | text_tdd_exception_test.cpp | 37 const char* colorStr = "color"; in ComponentTextStyleSetExceptionTest007() local 38 jerry_value_t textKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(colorStr)); in ComponentTextStyleSetExceptionTest007()
|
H A D | slider_tdd_test.cpp | 172 const char* colorStr = "color"; in ComponentSliderStyleSetColorTest004() local 173 jerry_value_t textKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(colorStr)); in ComponentSliderStyleSetColorTest004() 194 UpdateNumAttributeOrStyleValue(sliderComponent, colorStr, expectColorValue2, false); in ComponentSliderStyleSetColorTest004() 207 UpdateNumAttributeOrStyleValue(sliderComponent, colorStr, expectColorValue3, false); in ComponentSliderStyleSetColorTest004() 220 UpdateCharAttributeOrStyleValue(sliderComponent, colorStr, exceptionColorStrValue, false); in ComponentSliderStyleSetColorTest004()
|
H A D | text_tdd_test.cpp | 95 const char* colorStr = "color"; in ComponentTextStyleSetColorTest002() local 96 jerry_value_t textKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(colorStr)); in ComponentTextStyleSetColorTest002() 121 UpdateNumAttributeOrStyleValue(textComponent, colorStr, expectColorValue2, false); in ComponentTextStyleSetColorTest002() 133 UpdateNumAttributeOrStyleValue(textComponent, colorStr, expectColorValue3, false); in ComponentTextStyleSetColorTest002()
|
/foundation/barrierfree/accessibility/interfaces/kits/napi/src/ |
H A D | napi_accessibility_utils.cpp | 1606 std::string colorStr = ConvertColorToString(color); in ConvertCaptionPropertyToJS() local 1607 NAPI_CALL_RETURN_VOID(env, napi_create_string_utf8(env, colorStr.c_str(), NAPI_AUTO_LENGTH, &value)); in ConvertCaptionPropertyToJS() 1615 colorStr = ConvertColorToString(color); in ConvertCaptionPropertyToJS() 1616 NAPI_CALL_RETURN_VOID(env, napi_create_string_utf8(env, colorStr.c_str(), NAPI_AUTO_LENGTH, &value)); in ConvertCaptionPropertyToJS() 1620 colorStr = ConvertColorToString(color); in ConvertCaptionPropertyToJS() 1621 NAPI_CALL_RETURN_VOID(env, napi_create_string_utf8(env, colorStr.c_str(), NAPI_AUTO_LENGTH, &value)); in ConvertCaptionPropertyToJS() 1625 uint32_t ConvertColorStringToNumer(std::string colorStr) in ConvertColorStringToNumer() argument 1627 HILOG_DEBUG("colorStr is %{public}s", colorStr.c_str()); in ConvertColorStringToNumer() 1629 if (colorStr in ConvertColorStringToNumer() 1656 ColorRegexMatch(std::string colorStr, uint32_t &color) ColorRegexMatch() argument 1708 std::string colorStr = "#" + rgbStr + alphaStr; ConvertColorToString() local [all...] |
H A D | napi_accessibility_system_ability_client.cpp | 1198 std::string colorStr = ConvertColorToString(color); in GetCaptionFrontColor() local 1199 napi_create_string_utf8(env, colorStr.c_str(), NAPI_AUTO_LENGTH, &returnValue); in GetCaptionFrontColor() 1287 std::string colorStr = ConvertColorToString(color); in GetCaptionBackgroundColor() local 1288 napi_create_string_utf8(env, colorStr.c_str(), NAPI_AUTO_LENGTH, &returnValue); in GetCaptionBackgroundColor() 1329 std::string colorStr = ConvertColorToString(color); in GetCaptionWindowColor() local 1330 napi_create_string_utf8(env, colorStr.c_str(), NAPI_AUTO_LENGTH, &returnValue); in GetCaptionWindowColor()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/svg/parse/ |
H A D | svg_attributes_parser.cpp | 271 bool SvgAttributesParser::CheckColorAlpha(const std::string& colorStr, Color& result) in CheckColorAlpha() argument 274 if (std::regex_match(colorStr, matches, COLOR_WITH_ALPHA)) { in CheckColorAlpha()
|
H A D | svg_attributes_parser.h | 38 static bool CheckColorAlpha(const std::string& colorStr, Color& result);
|
/foundation/barrierfree/accessibility/interfaces/innerkits/common/include/ |
H A D | accessibility_utils.h | 106 uint32_t ConvertColorStringToNumer(std::string colorStr); 107 bool ColorRegexMatch(std::string colorStr, uint32_t &color);
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/canvas/ |
H A D | js_canvas_renderer.cpp | 332 std::string colorStr; in JsSetFillStyle() local 333 if (info.GetStringArg(0, colorStr) && Color::ParseColorString(colorStr, color)) { in JsSetFillStyle() 369 std::string colorStr; in JsSetStrokeStyle() local 370 if (info.GetStringArg(0, colorStr) && Color::ParseColorString(colorStr, color)) { in JsSetStrokeStyle() 1048 std::string colorStr; in JsSetShadowColor() local 1049 if (info.GetStringArg(0, colorStr)) { in JsSetShadowColor() 1050 renderingContext2DModel_->SetShadowColor(Color::FromString(colorStr)); in JsSetShadowColor()
|
/foundation/arkui/ace_engine/interfaces/napi/kits/utils/ |
H A D | napi_utils.cpp | 969 std::optional<std::string> colorStr = GetStringFromValueUtf8(env, value); in ParseShadowColorStrategy() local 970 if (colorStr.has_value()) { in ParseShadowColorStrategy() 971 if (colorStr->compare("average") == 0) { in ParseShadowColorStrategy() 974 } else if (colorStr->compare("primary") == 0) { in ParseShadowColorStrategy()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/ |
H A D | span_node.cpp | 756 auto colorStr = std::string("["); in SymbolColorToString() local 759 colorStr.append(color.ColorToString()); in SymbolColorToString() 760 colorStr.append(","); in SymbolColorToString() 763 colorStr.append("]"); in SymbolColorToString() 764 return colorStr; in SymbolColorToString()
|
/foundation/window/window_manager/interfaces/kits/napi/window_runtime/window_napi/ |
H A D | js_window_utils.cpp | 793 std::string colorStr;
in GetColorFromJs() local 794 if (!ConvertFromJsValue(env, jsColor, colorStr)) {
in GetColorFromJs() 799 if (!std::regex_match(colorStr, pattern)) {
in GetColorFromJs() 803 std::string color = colorStr.substr(1);
in GetColorFromJs() 813 colorStr.c_str(), color.c_str(), hexColor);
in GetColorFromJs()
|
/foundation/window/window_manager/interfaces/kits/cj/window_runtime/ |
H A D | window_impl.cpp | 955 static uint32_t GetColorFromJs(const std::string& colorStr, uint32_t defaultColor, bool& flag) in GetColorFromJs() argument 958 if (!std::regex_match(colorStr, pattern)) { in GetColorFromJs() 962 std::string color = colorStr.substr(1); in GetColorFromJs() 972 colorStr.c_str(), color.c_str(), hexColor); in GetColorFromJs()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/search/ |
H A D | search_pattern.cpp | 1661 auto colorStr = std::string("["); in SymbolColorToString() local 1663 colorStr.append(color.ColorToString()); in SymbolColorToString() 1664 colorStr.append(","); in SymbolColorToString() 1666 colorStr.append("]"); in SymbolColorToString() 1667 return colorStr; in SymbolColorToString()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/dialog/ |
H A D | dialog_pattern.h | 358 RefPtr<FrameNode> CreateButtonText(const std::string& text, const std::string& colorStr);
|
H A D | dialog_pattern.cpp | 902 RefPtr<FrameNode> DialogPattern::CreateButtonText(const std::string& text, const std::string& colorStr) in CreateButtonText() argument 920 if (Color::ParseColorString(colorStr, color)) { in CreateButtonText()
|
/foundation/arkui/ace_engine/frameworks/bridge/js_frontend/engine/jsi/ |
H A D | jsi_canvas_bridge.cpp | 1973 auto colorStr = proto->ToString(runtime); in JsFillStyleSetter() local 1974 auto color = Color::FromString(colorStr); in JsFillStyleSetter() 2013 auto colorStr = proto->ToString(runtime); in JsStrokeStyleSetter() local 2014 auto color = Color::FromString(colorStr); in JsStrokeStyleSetter() 2358 auto colorStr = proto->ToString(runtime); in JsShadowColorSetter() local 2359 auto color = Color::FromString(colorStr); in JsShadowColorSetter()
|
H A D | jsi_offscreen_canvas_bridge.cpp | 1579 auto colorStr = proto->ToString(runtime); in JsFillStyleSetter() local 1580 auto color = Color::FromString(colorStr); in JsFillStyleSetter() 1629 auto colorStr = proto->ToString(runtime); in JsStrokeStyleSetter() local 1630 auto color = Color::FromString(colorStr); in JsStrokeStyleSetter() 2004 auto colorStr = proto->ToString(runtime); in JsShadowColorSetter() local 2005 auto color = Color::FromString(colorStr); in JsShadowColorSetter()
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsi/nativeModule/ |
H A D | arkts_native_swiper_bridge.cpp | 646 std::string colorStr = ArkTSUtils::ParseJsColorAlpha(vm, colorArg, color) ? std::to_string(color.GetValue()) : "-"; in GetSwiperDotIndicator() local 656 selectedItemHeight + "|" + mask + "|" + colorStr + "|" + selectedColor + "|" + left + in GetSwiperDotIndicator()
|
H A D | arkts_native_common_bridge.cpp | 198 std::string colorStr = value->ToString(vm)->ToString(vm); in ParseJsShadowColorStrategy() local 199 if (colorStr.compare("average") == 0) { in ParseJsShadowColorStrategy() 202 } else if (colorStr.compare("primary") == 0) { in ParseJsShadowColorStrategy() 3625 std::string colorStr = colorArg->ToString(vm)->ToString(vm); in SetForegroundColor() local 3626 colorStr.erase(std::remove(colorStr.begin(), colorStr.end(), ' '), colorStr.end()); in SetForegroundColor() 3627 std::transform(colorStr.begin(), colorStr in SetForegroundColor() [all...] |