4
* A basic GL/GLES Abstraction/Utility Layer
6
* Authored By Matthew Allum <mallum@openedhand.com>
8
* Copyright (C) 2007 OpenedHand
10
* This library is free software; you can redistribute it and/or
11
* modify it under the terms of the GNU Lesser General Public
12
* License as published by the Free Software Foundation; either
13
* version 2 of the License, or (at your option) any later version.
15
* This library is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
* Lesser General Public License for more details.
20
* You should have received a copy of the GNU Lesser General Public
21
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
26
#ifndef __COGL_BITMAP_H
27
#define __COGL_BITMAP_H
31
#include "cogl-handle.h"
33
typedef struct _CoglBitmap
35
CoglHandleObject _parent;
37
CoglPixelFormat format;
44
_cogl_bitmap_can_convert (CoglPixelFormat src, CoglPixelFormat dst);
47
_cogl_bitmap_fallback_can_convert (CoglPixelFormat src, CoglPixelFormat dst);
50
_cogl_bitmap_can_unpremult (CoglPixelFormat format);
53
_cogl_bitmap_fallback_can_unpremult (CoglPixelFormat format);
56
_cogl_bitmap_can_premult (CoglPixelFormat format);
59
_cogl_bitmap_fallback_can_premult (CoglPixelFormat format);
62
_cogl_bitmap_convert (const CoglBitmap *bmp,
64
CoglPixelFormat dst_format);
66
_cogl_bitmap_fallback_convert (const CoglBitmap *bmp,
68
CoglPixelFormat dst_format);
71
_cogl_bitmap_unpremult (CoglBitmap *dst_bmp);
74
_cogl_bitmap_fallback_unpremult (CoglBitmap *dst_bmp);
77
_cogl_bitmap_premult (CoglBitmap *dst_bmp);
80
_cogl_bitmap_fallback_premult (CoglBitmap *dst_bmp);
83
_cogl_bitmap_from_file (CoglBitmap *bmp,
88
_cogl_bitmap_fallback_from_file (CoglBitmap *bmp,
89
const char *filename);
92
_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
93
CoglPixelFormat dst_format);
96
_cogl_bitmap_convert_format_and_premult (const CoglBitmap *bmp,
98
CoglPixelFormat dst_format);
101
_cogl_bitmap_copy_subregion (CoglBitmap *src,
111
_cogl_bitmap_get_size_from_file (const char *filename,
115
#endif /* __COGL_BITMAP_H */