]> git.sesse.net Git - vlc/blob - modules/gui/beos/DrawingTidbits.h
* ./modules/*: moved plugins to the new tree. Yet untested builds include
[vlc] / modules / gui / beos / DrawingTidbits.h
1 /*****************************************************************************
2  * DrawingTidbits.h
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: DrawingTidbits.h,v 1.1 2002/08/04 17:23:43 sam Exp $
6  *
7  * Authors: Tony Castley <tcastley@mail.powerup.com.au>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 #ifndef __DRAWING_TIBITS__
25 #define __DRAWING_TIBITS__
26
27 #include <GraphicsDefs.h>
28
29 rgb_color ShiftColor(rgb_color , float );
30
31 bool operator==(const rgb_color &, const rgb_color &);
32 bool operator!=(const rgb_color &, const rgb_color &);
33
34 inline rgb_color
35 Color(int32 r, int32 g, int32 b, int32 alpha = 255)
36 {
37         rgb_color result;
38         result.red = r;
39         result.green = g;
40         result.blue = b;
41         result.alpha = alpha;
42
43         return result;
44 }
45
46 const rgb_color kWhite = { 255, 255, 255, 255};
47 const rgb_color kBlack = { 0, 0, 0, 255};
48
49 const float kDarkness = 1.06;
50 const float kDimLevel = 0.6;
51
52 void ReplaceColor(BBitmap *bitmap, rgb_color from, rgb_color to);
53 void ReplaceTransparentColor(BBitmap *bitmap, rgb_color with);
54
55 #endif