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