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, write to the
22
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
* Boston, MA 02111-1307, USA.
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 (const CoglBitmap *bmp,
75
_cogl_bitmap_fallback_unpremult (const CoglBitmap *bmp,
79
_cogl_bitmap_premult (const CoglBitmap *bmp,
83
_cogl_bitmap_fallback_premult (const CoglBitmap *bmp,
87
_cogl_bitmap_from_file (CoglBitmap *bmp,
88
const gchar *filename,
92
_cogl_bitmap_fallback_from_file (CoglBitmap *bmp,
93
const gchar *filename);
96
_cogl_bitmap_convert_and_premult (const CoglBitmap *bmp,
98
CoglPixelFormat dst_format);
101
_cogl_bitmap_copy_subregion (CoglBitmap *src,
111
_cogl_bitmap_get_size_from_file (const gchar *filename,
115
#endif /* __COGL_BITMAP_H */