1 /* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 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 #ifndef RENDER_SERVICE_CLIENT_CORE_RENDER_RS_BLUR_FILTER_H 16 #define RENDER_SERVICE_CLIENT_CORE_RENDER_RS_BLUR_FILTER_H 17 18 #include "render/rs_skia_filter.h" 19 #include "common/rs_macros.h" 20 21 namespace OHOS { 22 namespace Rosen { 23 class RSB_EXPORT RSBlurFilter : public RSSkiaFilter { 24 public: 25 RSBlurFilter(float blurRadiusX, float blurRadiusY); 26 ~RSBlurFilter() override; 27 float GetBlurRadiusX(); 28 float GetBlurRadiusY(); 29 30 std::shared_ptr<RSFilter> Add(const std::shared_ptr<RSFilter>& rhs) override; 31 std::shared_ptr<RSFilter> Sub(const std::shared_ptr<RSFilter>& rhs) override; 32 std::shared_ptr<RSFilter> Multiply(float rhs) override; 33 std::shared_ptr<RSFilter> Negate() override; 34 private: 35 float blurRadiusX_; 36 float blurRadiusY_; 37 }; 38 } // namespace Rosen 39 } // namespace OHOS 40 41 #endif // RENDER_SERVICE_CLIENT_CORE_RENDER_RS_BLUR_FILTER_H 42