1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd.. All rights reserved. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef SYMBOL_CONSTANTS_H 17 #define SYMBOL_CONSTANTS_H 18 19 #include <cstddef> 20 #include <cstdint> 21 #include <optional> 22 23 #include "draw/path.h" 24 #include "draw/color.h" 25 26 namespace OHOS { 27 namespace Rosen { 28 29 enum class LoadSymbolErrorCode { 30 SUCCESS = 0, 31 JSON_ERROR, 32 LOAD_FAILED, 33 }; 34 35 enum class SymbolType { 36 SYSTEM = 0, 37 CUSTOM, 38 }; 39 40 enum class SymbolColorType { 41 COLOR_TYPE = 0, // Each layer has a color. Layers without a set use the default color. 42 GRADIENT_TYPE = 1, // Each layer has a color or gradient color. 43 // Layers without a set use the color of the previous layer. 44 GRADIENT_DEFAULT_COLOR = 2, // Each layer has a color or gradient color. 45 // Layers without a set use the color of the default layer. 46 }; 47 48 struct SymbolShadow { 49 Drawing::Color color = Drawing::Color::COLOR_BLACK; 50 Drawing::Point offset; 51 double blurRadius = 0.0; 52 }; 53 } // namespace Rosen 54 } // namespace OHOS 55 56 #endif // SYMBOL_CONSTANTS_H