1 /*
2 * Copyright (c) 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
16 #include "pixel_map_preview.h"
17
18 #include "base/image/pixel_map.h"
19 #include "base/log/log_wrapper.h"
20 #include "base/utils/utils.h"
21
22 namespace OHOS::Ace {
CreatePixelMap(void * rawPtr)23 RefPtr<PixelMap> PixelMap::CreatePixelMap(void* rawPtr)
24 {
25 return nullptr;
26 }
27
GetFromDrawable(void * ptr)28 RefPtr<PixelMap> PixelMap::GetFromDrawable(void* ptr)
29 {
30 return nullptr;
31 }
32
GetPxielMapListFromAnimatedDrawable(void * ptr,std::vector<RefPtr<PixelMap>> & pixelMaps,int32_t & duration,int32_t & iterations)33 bool PixelMap::GetPxielMapListFromAnimatedDrawable(void* ptr, std::vector<RefPtr<PixelMap>>& pixelMaps,
34 int32_t& duration, int32_t& iterations)
35 {
36 return false;
37 }
38
CreatePixelMapFromDataAbility(void * uniquePtr)39 RefPtr<PixelMap> PixelMap::CreatePixelMapFromDataAbility(void* uniquePtr)
40 {
41 return nullptr;
42 }
43
ConvertSkImageToPixmap(const uint32_t * colors,uint32_t colorLength,int32_t width,int32_t height)44 RefPtr<PixelMap> PixelMap::ConvertSkImageToPixmap(
45 const uint32_t* colors, uint32_t colorLength, int32_t width, int32_t height)
46 {
47 return nullptr;
48 }
49
DecodeTlv(std::vector<uint8_t> & buff)50 RefPtr<PixelMap> PixelMap::DecodeTlv(std::vector<uint8_t>& buff)
51 {
52 return nullptr;
53 }
54
GetWidth() const55 int32_t PixelMapPreview::GetWidth() const
56 {
57 return -1;
58 }
59
GetHeight() const60 int32_t PixelMapPreview::GetHeight() const
61 {
62 return -1;
63 }
64
GetPixels() const65 const uint8_t* PixelMapPreview::GetPixels() const
66 {
67 return nullptr;
68 }
69
GetPixelsVec(std::vector<uint8_t> & data) const70 bool PixelMapPreview::GetPixelsVec(std::vector<uint8_t>& data) const
71 {
72 return false;
73 }
74
GetPixelFormat() const75 PixelFormat PixelMapPreview::GetPixelFormat() const
76 {
77 return PixelFormat::UNKNOWN;
78 }
79
GetAlphaType() const80 AlphaType PixelMapPreview::GetAlphaType() const
81 {
82 return AlphaType::IMAGE_ALPHA_TYPE_UNKNOWN;
83 }
84
GetRowStride() const85 int32_t PixelMapPreview::GetRowStride() const
86 {
87 return 0;
88 }
89
GetRowBytes() const90 int32_t PixelMapPreview::GetRowBytes() const
91 {
92 return 0;
93 }
94
GetByteCount() const95 int32_t PixelMapPreview::GetByteCount() const
96 {
97 return 0;
98 }
99
GetPixelManager() const100 void* PixelMapPreview::GetPixelManager() const
101 {
102 return nullptr;
103 }
104
GetRawPixelMapPtr() const105 void* PixelMapPreview::GetRawPixelMapPtr() const
106 {
107 return nullptr;
108 }
109
GetId()110 std::string PixelMapPreview::GetId()
111 {
112 return "";
113 }
114
GetModifyId()115 std::string PixelMapPreview::GetModifyId()
116 {
117 return "";
118 }
119
EncodeTlv(std::vector<uint8_t> & buff)120 bool PixelMapPreview::EncodeTlv(std::vector<uint8_t>& buff)
121 {
122 return false;
123 }
124
Scale(float xAxis,float yAxis)125 void PixelMapPreview::Scale(float xAxis, float yAxis) {}
126
Scale(float xAxis,float yAxis,const AceAntiAliasingOption & option)127 void PixelMapPreview::Scale(float xAxis, float yAxis, const AceAntiAliasingOption &option) {}
128
129 } // namespace OHOS::Ace
130