PageRenderTime 243ms CodeModel.GetById 80ms app.highlight 5ms RepoModel.GetById 156ms app.codeStats 0ms

/src/canvas/dummy/ftk_bitmap_dummy.c

http://ftk.googlecode.com/
C | 98 lines | 51 code | 19 blank | 28 comment | 5 complexity | 403c6b774f609976bf22db97427cc958 MD5 | raw file
 1/*
 2 * File: ftk_bitmap_dummy.c
 3 * Author:  Li XianJing <xianjimli@hotmail.com>
 4 * Brief:   dummy bitmap implemntation.
 5 *
 6 * Copyright (c) 2009 - 2011  Li XianJing <xianjimli@hotmail.com>
 7 *
 8 * Licensed under the Academic Free License version 2.1
 9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program 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
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23 */
24
25/*
26 * History:
27 * ================================================================
28 * 2011-10-03 Li XianJing <xianjimli@hotmail.com> created
29 */
30
31#include "ftk_bitmap.h"
32#include "ftk_globals.h"
33
34FtkBitmap* ftk_bitmap_create(int w, int h, FtkColor color)
35{
36	FtkBitmap* thiz = (FtkBitmap*)FTK_ALLOC(sizeof(FtkBitmap));
37
38	return thiz;
39}
40
41FtkBitmap* ftk_bitmap_create_with_native(void* bitmap)
42{
43	FtkBitmap* thiz = (FtkBitmap*)FTK_ALLOC(sizeof(FtkBitmap));
44
45	if(thiz != NULL)
46	{
47		thiz->ref = 1;
48		thiz->data = bitmap;
49	}
50
51	return thiz;
52}
53
54void* ftk_bitmap_get_native(FtkBitmap* thiz)
55{
56	return_val_if_fail(thiz != NULL, NULL);
57
58	return thiz->data;
59}
60
61int ftk_bitmap_width(FtkBitmap* thiz)
62{
63	return 0;
64}
65
66int ftk_bitmap_height(FtkBitmap* thiz)
67{
68	return 0;
69}
70
71FtkColor* ftk_bitmap_lock(FtkBitmap* thiz)
72{
73	return NULL;
74}
75
76void    ftk_bitmap_unlock(FtkBitmap* thiz)
77{
78	return;
79}
80
81FtkColor ftk_bitmap_get_pixel(FtkBitmap* thiz, int x, int y)
82{
83	FtkColor c = {0, 0, 0, 0};	
84	
85	return c;
86}
87
88void ftk_bitmap_destroy(FtkBitmap* thiz)
89{
90	if(thiz != NULL)
91	{
92
93		FTK_ZFREE(thiz, sizeof(FtkBitmap));
94	}
95
96	return;
97}
98