1 #ifndef DALI_INTEGRATION_RESOURCE_TYPES_H
2 #define DALI_INTEGRATION_RESOURCE_TYPES_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali/public-api/images/image-operations.h>
26 #include <dali/public-api/math/uint-16-pair.h>
30 using ImageDimensions = Uint16Pair;
35 * BitmapResourceType describes a bitmap resource.
37 struct BitmapResourceType
41 * @param[in] size The requested size for the bitmap.
42 * @param[in] scalingMode The method to use to map the source bitmap to the desired
44 * @param[in] samplingMode The filter to use if the bitmap needs to be downsampled
45 * to the requested size.
46 * @param[in] orientationCorrection Whether to use bitmap metadata to rotate or
47 * flip the bitmap, e.g., from portrait to landscape.
49 BitmapResourceType(ImageDimensions size = ImageDimensions(0, 0),
50 FittingMode::Type scalingMode = FittingMode::DEFAULT,
51 SamplingMode::Type samplingMode = SamplingMode::DEFAULT,
52 bool orientationCorrection = true)
54 scalingMode(scalingMode),
55 samplingMode(samplingMode),
56 orientationCorrection(orientationCorrection)
63 ~BitmapResourceType() = default;
66 * Attributes are copied from the request.
69 FittingMode::Type scalingMode;
70 SamplingMode::Type samplingMode;
71 bool orientationCorrection;
74 // Undefined copy constructor.
75 BitmapResourceType(const BitmapResourceType& typePath);
77 // Undefined assignment operator.
78 BitmapResourceType& operator=(const BitmapResourceType& rhs);
81 } // namespace Integration
85 #endif // DALI_INTEGRATION_RESOURCE_TYPES_H