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 16 #ifndef RENDER_VIEW_PORT_H 17 #define RENDER_VIEW_PORT_H 18 19 #include "base/render_base.h" 20 21 namespace OHOS { 22 namespace Media { 23 namespace Effect { 24 class RenderViewport { 25 public: RenderViewport()26 RenderViewport() : leftBottomX_(0), leftBottomY_(0), width_(0), height_(0) {} 27 RenderViewport(int leftBottomX,int leftBottomY,int width,int height)28 RenderViewport(int leftBottomX, int leftBottomY, int width, int height) 29 : leftBottomX_(leftBottomX), leftBottomY_(leftBottomY), width_(width), height_(height) 30 {} 31 ~RenderViewport()32 ~RenderViewport(){}; Set(int leftBottomX,int leftBottomY,int width,int height)33 void Set(int leftBottomX, int leftBottomY, int width, int height) 34 { 35 leftBottomX_ = leftBottomX; 36 leftBottomY_ = leftBottomY; 37 width_ = width; 38 height_ = height; 39 } 40 int leftBottomX_; 41 int leftBottomY_; 42 int width_; 43 int height_; 44 }; 45 } // namespace Effect 46 } // namespace Media 47 } // namespace OHOS 48 #endif