1 /* 2 * Copyright (c) 2021 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 IMPLFACTORY_H 17 #define IMPLFACTORY_H 18 19 #include "impl_interface/bitmap_impl.h" 20 #include "impl_interface/camera_impl.h" 21 #include "impl_interface/color_filter_impl.h" 22 #include "impl_interface/color_space_impl.h" 23 #include "impl_interface/core_canvas_impl.h" 24 #include "impl_interface/image_filter_impl.h" 25 #include "impl_interface/image_impl.h" 26 #include "impl_interface/mask_filter_impl.h" 27 #include "impl_interface/matrix_impl.h" 28 #include "impl_interface/path_effect_impl.h" 29 #include "impl_interface/path_impl.h" 30 #include "impl_interface/picture_impl.h" 31 #include "impl_interface/shader_effect_impl.h" 32 33 namespace OHOS { 34 namespace Rosen { 35 namespace Drawing { 36 class ImplFactory { 37 public: 38 static std::unique_ptr<CoreCanvasImpl> CreateCoreCanvasImpl(); 39 static std::unique_ptr<CoreCanvasImpl> CreateCoreCanvasImpl(void* rawCanvas); 40 static std::unique_ptr<BitmapImpl> CreateBitmapImpl(); 41 static std::unique_ptr<ImageImpl> CreateImageImpl(); 42 static std::unique_ptr<ImageImpl> CreateImageImpl(void* rawImage); 43 static std::unique_ptr<PathImpl> CreatePathImpl(); 44 static std::unique_ptr<ColorFilterImpl> CreateColorFilterImpl(); 45 static std::unique_ptr<MaskFilterImpl> CreateMaskFilterImpl(); 46 static std::unique_ptr<ImageFilterImpl> CreateImageFilterImpl(); 47 static std::unique_ptr<PictureImpl> CreatePictureImpl(); 48 static std::unique_ptr<ShaderEffectImpl> CreateShaderEffectImpl(); 49 static std::unique_ptr<PathEffectImpl> CreatePathEffectImpl(); 50 static std::unique_ptr<ColorSpaceImpl> CreateColorSpaceImpl(); 51 static std::unique_ptr<MatrixImpl> CreateMatrixImpl(); 52 static std::unique_ptr<CameraImpl> CreateCameraImpl(); 53 }; 54 } // namespace Drawing 55 } // namespace Rosen 56 } // namespace OHOS 57 #endif 58