2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 #ifndef HERE_GRAPHIC_UTIL_H
18 #define HERE_GRAPHIC_UTIL_H
20 #include "common/HereMaps_global.h"
21 #include "graphic/Grp_UtilType.h"
22 #include "graphic/Bitmap.h"
23 #include "graphic/PngDecoder.h"
25 TIZEN_MAPS_BEGIN_NAMESPACE
29 bool IntersectRect(Rectangle<int>& outRect,
30 const Rectangle<int>& srcRect1,
31 const Rectangle<int>& srcRect2);
33 bool IntersectRect(Rectangle<float>& outRect,
34 const Rectangle<float>& srcRect1,
35 const Rectangle<float>& srcRect2);
37 long GetHashCode(const char *string);
39 EXPORT_API Bitmap* DecodePngToBmp(const byte* buffer, size_t size,
40 MediaPixelFormat pixelFormat=MEDIA_PIXEL_FORMAT_RGBA8888);
42 EXPORT_API void ConvertRGBA2BGRA(void *data, unsigned int w, unsigned int h,
43 MediaPixelFormat format=MEDIA_PIXEL_FORMAT_RGBA8888);
49 return (t >= 0) ? t : -t;
56 return (a < b) ? a : b;
63 return (a > b) ? a : b;
67 TIZEN_MAPS_END_NAMESPACE
69 #endif /* HERE_GRAPHIC_UTIL_H */