1 /* 2 * Copyright (c) 2024 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_PIXEL_STRETCH_PARAMS_H 16 #define RENDER_SERVICE_CLIENT_CORE_RENDER_RS_PIXEL_STRETCH_PARAMS_H 17 18 #include <cstdint> 19 #include "common/rs_macros.h" 20 21 namespace OHOS { 22 namespace Rosen { 23 24 class RSB_EXPORT RSPixelStretchParams { 25 public: RSPixelStretchParams()26 explicit RSPixelStretchParams() {} RSPixelStretchParams(float offsetX,float offsetY,float offsetZ,float offsetW,int tileMode,float width,float height)27 RSPixelStretchParams(float offsetX, float offsetY, float offsetZ, float offsetW, 28 int tileMode, float width, float height) : 29 offsetX_(offsetX), offsetY_(offsetY), offsetZ_(offsetZ), offsetW_(offsetW), 30 tileMode_(tileMode), width_(width), height_(height) {} 31 32 ~RSPixelStretchParams() = default; 33 34 // offset percent 35 float offsetX_ = 0.0; 36 float offsetY_ = 0.0; 37 float offsetZ_ = 0.0; 38 float offsetW_ = 0.0; 39 40 int tileMode_ = 0; 41 float width_ = 0.0; 42 float height_ = 0.0; 43 }; 44 45 } // namespace Rosen 46 } // namespace OHOS 47 48 #endif // RENDER_SERVICE_CLIENT_CORE_RENDER_RS_PIXEL_STRETCH_PARAMS_H 49